diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2011-09-01 12:15:43 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2011-09-01 12:15:43 +0000 |
| commit | 4db3e8965270dfe813a14c5ee9bcd0b645eb2edf (patch) | |
| tree | ff785e25196226037c509428497b95f0e1e219b9 /apps | |
| parent | d67d6a8462e02770d81d6a01f3193d0a2050fbe2 (diff) | |
| download | rockbox-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')
| -rw-r--r-- | apps/playback.c | 13 | ||||
| -rw-r--r-- | apps/playback.h | 1 | ||||
| -rw-r--r-- | apps/radio/radio.c | 2 | ||||
| -rw-r--r-- | apps/recorder/recording.c | 2 |
4 files changed, 4 insertions, 14 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) { diff --git a/apps/playback.h b/apps/playback.h index 793055f..6e57c03 100644 --- a/apps/playback.h +++ b/apps/playback.h @@ -70,7 +70,6 @@ struct bufopen_bitmap_data { #endif /* Functions */ -bool audio_is_thread_ready(void); int audio_track_count(void); long audio_filebufused(void); void audio_pre_ff_rewind(void); diff --git a/apps/radio/radio.c b/apps/radio/radio.c index 1a77709..4524707 100644 --- a/apps/radio/radio.c +++ b/apps/radio/radio.c @@ -418,7 +418,7 @@ void radio_screen(void) /* turn on radio */ #if CONFIG_CODEC == SWCODEC /* This should be done before touching audio settings */ - while (!audio_is_thread_ready()) + while (!pcm_is_initialized()) sleep(0); audio_set_input_source(AUDIO_SRC_FMRADIO, diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 453b2fc..d706899 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -1074,7 +1074,7 @@ bool recording_screen(bool no_source) #if CONFIG_CODEC == SWCODEC /* This should be done before touching audio settings */ - while (!audio_is_thread_ready()) + while (!pcm_is_initialized()) sleep(0); /* recording_menu gets messed up: so prevent manus talking */ |