mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-12 00:47:49 -04:00
xrick: Fix a race condition that could result in audio stopping
get_more() can disable audio when there's nothing more to genreate but that can get called (and "fail") _before_ we set the flag that audio is turned on. If this occurs, we will incorrecly set the "audio on" flag after the failure which will prevent the mixer from being re-started. (We're at the mercy of thread scheduling) Change-Id: I4f6c50a71c7ad685ff45f775e7e4b1c61b8b7777
This commit is contained in:
parent
f235443ba1
commit
e677895e29
1 changed files with 1 additions and 1 deletions
|
|
@ -222,8 +222,8 @@ void syssnd_update(void)
|
||||||
|
|
||||||
if (!isAudioPlaying && fillCount > 0)
|
if (!isAudioPlaying && fillCount > 0)
|
||||||
{
|
{
|
||||||
rb->mixer_channel_play_data(PCM_MIXER_CHAN_PLAYBACK, get_more, NULL, 0);
|
|
||||||
isAudioPlaying = true;
|
isAudioPlaying = true;
|
||||||
|
rb->mixer_channel_play_data(PCM_MIXER_CHAN_PLAYBACK, get_more, NULL, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue