diff options
| author | Steve Bavin <pondlife@pondlife.me> | 2006-11-02 07:53:55 +0000 |
|---|---|---|
| committer | Steve Bavin <pondlife@pondlife.me> | 2006-11-02 07:53:55 +0000 |
| commit | f71da380c2e45426e67f9cd91dfeaad295c1641e (patch) | |
| tree | 66c69f58dcc671bd17c375ec1a8e2a5391e92bcb /apps | |
| parent | e5f43ebabad1bec0ea68fc8bb34b0273a228e281 (diff) | |
| download | rockbox-f71da380c2e45426e67f9cd91dfeaad295c1641e.zip rockbox-f71da380c2e45426e67f9cd91dfeaad295c1641e.tar.gz rockbox-f71da380c2e45426e67f9cd91dfeaad295c1641e.tar.bz2 rockbox-f71da380c2e45426e67f9cd91dfeaad295c1641e.tar.xz | |
A better fix for the crossfade setting crash (with no global variables added)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11415 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playback.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/apps/playback.c b/apps/playback.c index 04096b0..6d277f7 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -206,7 +206,6 @@ static bool playlist_end = false; /* Have we reached end of the cu static bool dir_skip = false; /* Is a directory skip pending? (A) */ static bool new_playlist = false; /* Are we starting a new playlist? (A) */ static int wps_offset = 0; /* Pending track change offset, to keep WPS responsive (A) */ -static bool quick_restart = false; /* Are we doing a quick restart for buffer resizing? (A) */ /* Callbacks.. */ void (*track_changed_callback)(struct mp3entry *id3); /* ...when current track has really changed */ @@ -460,7 +459,7 @@ void audio_stop(void) queue_post(&audio_queue, Q_AUDIO_STOP, 0); /* Don't return until playback has actually stopped */ - while(playing) + while(playing || !queue_empty(&audio_queue)) yield(); } @@ -624,7 +623,6 @@ void audio_set_crossfade(int enable) /* Playback has to be stopped before changing the buffer size. */ gui_syncsplash(0, true, (char *)str(LANG_RESTARTING_PLAYBACK)); - quick_restart = true; audio_stop(); } @@ -641,10 +639,7 @@ void audio_set_crossfade(int enable) /* Restart playback. */ if (was_playing) - { audio_play(offset); - quick_restart = false; - } } void audio_preinit(void) @@ -1852,11 +1847,8 @@ static void codec_thread(void) CUR_TI->id3.elapsed = CUR_TI->id3.length - pcmbuf_get_latency(); sleep(1); } - if (!quick_restart) - { - LOGFQUEUE("codec > audio Q_AUDIO_STOP"); - queue_post(&audio_queue, Q_AUDIO_STOP, 0); - } + LOGFQUEUE("codec > audio Q_AUDIO_STOP"); + queue_post(&audio_queue, Q_AUDIO_STOP, 0); break; } } |