Hi, I am quite new to this, so guess there's where the problem is.
Okay, I got an app which has a looping background music, and upon exit game, the music will stop. And goes into game again, the background should start playing again. The problem is it won't start playing the 2nd time it goes into game. Thats how i do it:
(I use the crash landing soundEngine)
<I load the sound in my init>
SoundEngine_Initialize(44100);
SoundEngine_SetListenerPosition(0.0, 0.0, 1.0);
//SoundEngine_LoadBackgroundMusicTrack([[bundle pathForResource"levelOne" ofType"mp3"] UTF8String], NO, YES);
<play the sound upon clicking playGame>
SoundEngine_StartBackgroundMusic();
<Stop the sound upon exit>
SoundEngine_StopBackgroundMusic(NO);
Am i missing out something? Sound played for the first time only. I tried putting the loading of the sound in the playGame function; load and play the background music. This actually enables the sound to playback when clicking playGame the 2nd time. But somehow it produces a bit of a delay in iPhone to start the game because of this. What i wanted is actually load once, and able to toggle between play and stop throughout. Need desperate help, thanks in advance.
Okay, I got an app which has a looping background music, and upon exit game, the music will stop. And goes into game again, the background should start playing again. The problem is it won't start playing the 2nd time it goes into game. Thats how i do it:
(I use the crash landing soundEngine)
<I load the sound in my init>
SoundEngine_Initialize(44100);
SoundEngine_SetListenerPosition(0.0, 0.0, 1.0);
//SoundEngine_LoadBackgroundMusicTrack([[bundle pathForResource"levelOne" ofType"mp3"] UTF8String], NO, YES);
<play the sound upon clicking playGame>
SoundEngine_StartBackgroundMusic();
<Stop the sound upon exit>
SoundEngine_StopBackgroundMusic(NO);
Am i missing out something? Sound played for the first time only. I tried putting the loading of the sound in the playGame function; load and play the background music. This actually enables the sound to playback when clicking playGame the 2nd time. But somehow it produces a bit of a delay in iPhone to start the game because of this. What i wanted is actually load once, and able to toggle between play and stop throughout. Need desperate help, thanks in advance.