summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-05-08 16:19:13 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-05-08 16:19:13 +0000
commite88078f9f50bd730ee5640e0737c7de24f054072 (patch)
tree0bc429f929f6446480c1a3f167ef2f83a7d89ca1 /apps/playback.c
parent34e6b6b2ae3a822d0e9c9228754201a2ebd39ed7 (diff)
Playback: Ensure some state coherency. paused implies playing and pause actions are bypassed if not playing. stopped implies not playing and not paused. Starting playback transistions to playing and not paused.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13360 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 889cf9406e..bdbb765e0f 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -3348,6 +3348,7 @@ static void audio_play_start(size_t offset)
playlist_end = false;
playing = true;
+ paused = false;
ci.new_track = 0;
ci.seek_time = 0;
wps_offset = 0;
@@ -3648,6 +3649,8 @@ static void audio_thread(void)
case Q_AUDIO_PAUSE:
LOGFQUEUE("audio < Q_AUDIO_PAUSE");
+ if (!playing)
+ break;
pcmbuf_pause((bool)ev.data);
paused = (bool)ev.data;
break ;