Background Music should now stop correctly when switch is OFF

This commit is contained in:
Bertrand Songis
2014-02-21 11:58:19 +01:00
parent 6955a492d7
commit 23b3ea1856
2 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -622,7 +622,7 @@ void AudioQueue::wakeup()
}
// mix the background context
if (!isFunctionActive(FUNCTION_BACKGND_MUSIC_PAUSE)) {
if (isFunctionActive(FUNCTION_BACKGND_MUSIC) && !isFunctionActive(FUNCTION_BACKGND_MUSIC_PAUSE)) {
result = backgroundContext.mixBuffer(buffer, g_eeGeneral.backgroundVolume, fade);
if (result > 0) {
size = max(size, result);
+1 -6
View File
@@ -3259,7 +3259,7 @@ void evalFunctions()
if (active || IS_PLAY_BOTH_FUNC(CFN_FUNC(sd))) {
switch(CFN_FUNC(sd)) {
switch (CFN_FUNC(sd)) {
case FUNC_SAFETY_CHANNEL:
safetyCh[CFN_CH_INDEX(sd)] = CFN_PARAM(sd);
@@ -3479,11 +3479,6 @@ void evalFunctions()
lastFunctionTime[i] = 0;
#if defined(CPUARM)
fnSwitchDuration[i] = 0;
#endif
#if defined(CPUARM) && defined(SDCARD)
if (CFN_FUNC(sd) == FUNC_BACKGND_MUSIC && isFunctionActive(FUNCTION_BACKGND_MUSIC)) {
STOP_PLAY(i+1);
}
#endif
}
}