diff options
| author | Steve Bavin <pondlife@pondlife.me> | 2006-09-28 09:20:56 +0000 |
|---|---|---|
| committer | Steve Bavin <pondlife@pondlife.me> | 2006-09-28 09:20:56 +0000 |
| commit | b2269cce949c217453facfbc3eecadd7ea5ef9bc (patch) | |
| tree | b9eab0afe5ce143c2b251fb10532c46a6ff4f24c | |
| parent | 8c9d5f35f005140629d116a09d75e36ddc44f4f3 (diff) | |
| download | rockbox-b2269cce949c217453facfbc3eecadd7ea5ef9bc.zip rockbox-b2269cce949c217453facfbc3eecadd7ea5ef9bc.tar.gz rockbox-b2269cce949c217453facfbc3eecadd7ea5ef9bc.tar.bz2 rockbox-b2269cce949c217453facfbc3eecadd7ea5ef9bc.tar.xz | |
Fix hangs when changing crossfade settings
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11084 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/playback.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c index 2b6081b..5996886 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -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(); } } |