From 4db3e8965270dfe813a14c5ee9bcd0b645eb2edf Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 1 Sep 2011 12:15:43 +0000 Subject: 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 --- apps/playback.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'apps/playback.c') diff --git a/apps/playback.c b/apps/playback.c index 9fd25b975d..dbe28dd1c4 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) { -- cgit v1.2.3