forked from len0rd/rockbox
Fix hangs when changing crossfade settings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11084 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
8c9d5f35f0
commit
b2269cce94
1 changed files with 6 additions and 4 deletions
|
|
@ -620,12 +620,13 @@ void audio_set_crossfade(int enable)
|
|||
{
|
||||
/* Store the track resume position */
|
||||
offset = cur_ti->id3.offset;
|
||||
|
||||
/* Playback has to be stopped before changing the buffer size. */
|
||||
gui_syncsplash(0, true, (char *)str(LANG_RESTARTING_PLAYBACK));
|
||||
LOGFQUEUE("audio > audio Q_AUDIO_STOP");
|
||||
queue_post(&audio_queue, Q_AUDIO_STOP, 0);
|
||||
while (audio_codec_loaded)
|
||||
while (audio_codec_loaded || playing)
|
||||
yield();
|
||||
gui_syncsplash(0, true, (char *)str(LANG_RESTARTING_PLAYBACK));
|
||||
}
|
||||
|
||||
/* Re-initialize audio system. */
|
||||
|
|
@ -638,13 +639,14 @@ void audio_set_crossfade(int enable)
|
|||
voice_init();
|
||||
|
||||
/* Restart playback. */
|
||||
if (was_playing) {
|
||||
if (was_playing)
|
||||
{
|
||||
LOGFQUEUE("audio > audio Q_AUDIO_PLAY");
|
||||
queue_post(&audio_queue, Q_AUDIO_PLAY, (void *)offset);
|
||||
|
||||
/* Wait for the playback to start again (and display the splash
|
||||
screen during that period. */
|
||||
while (playing && !audio_codec_loaded)
|
||||
while (!playing && !audio_codec_loaded)
|
||||
yield();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue