summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-09-01 12:15:43 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-09-01 12:15:43 +0000
commit4db3e8965270dfe813a14c5ee9bcd0b645eb2edf (patch)
treeff785e25196226037c509428497b95f0e1e219b9 /apps/playback.c
parentd67d6a8462e02770d81d6a01f3193d0a2050fbe2 (diff)
downloadrockbox-4db3e8965270dfe813a14c5ee9bcd0b645eb2edf.zip
rockbox-4db3e8965270dfe813a14c5ee9bcd0b645eb2edf.tar.gz
rockbox-4db3e8965270dfe813a14c5ee9bcd0b645eb2edf.tar.bz2
rockbox-4db3e8965270dfe813a14c5ee9bcd0b645eb2edf.tar.xz
Shuffle some functions around so that interfacing with playback.c in particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 9fd25b9..dbe28dd 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -183,8 +183,7 @@ static struct albumart_slot
/* Buffer and thread state tracking */
static enum filling_state
{
- STATE_BOOT = 0, /* audio thread is not ready yet */
- STATE_IDLE, /* audio is stopped: nothing to do */
+ STATE_IDLE = 0, /* audio is stopped: nothing to do */
STATE_FILLING, /* adding tracks to the buffer */
STATE_FULL, /* can't add any more tracks */
STATE_END_OF_PLAYLIST, /* all remaining tracks have been added */
@@ -194,7 +193,7 @@ static enum filling_state
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
STATE_USB, /* USB mode, ignore most messages */
#endif
-} filling = STATE_BOOT;
+} filling = STATE_IDLE;
/* Track info - holds information about each track in the buffer */
struct track_info
@@ -2917,8 +2916,6 @@ static void audio_thread(void)
pcm_postinit();
- filling = STATE_IDLE;
-
while (1)
{
switch (filling)
@@ -3717,12 +3714,6 @@ unsigned long audio_prev_elapsed(void)
return prev_track_elapsed;
}
-/* Is the audio thread ready to accept commands? */
-bool audio_is_thread_ready(void)
-{
- return filling != STATE_BOOT;
-}
-
/* Return total file buffer length after accounting for the talk buf */
size_t audio_get_filebuflen(void)
{