summaryrefslogtreecommitdiffstats
path: root/apps/audio_thread.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-05-31 04:13:39 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-05-31 04:13:39 -0400
commit344b9d09860af193a0a297438432339f4108c574 (patch)
tree6178600bfbfb140bf20475ce578ff4748fdf4630 /apps/audio_thread.c
parent5857c44017a1641fce7f00da7f16c143daacbaf6 (diff)
downloadrockbox-344b9d09860af193a0a297438432339f4108c574.tar.gz
rockbox-344b9d09860af193a0a297438432339f4108c574.tar.bz2
rockbox-344b9d09860af193a0a297438432339f4108c574.zip
Some corrections after 5857c44.
Playback needs to receive a couple of settings-related messages even when not playing. Put the message reply back where it was when loading an encoder for recording. Change-Id: I8cc80f46e42a0afd119991d698510e1ebef38ead
Diffstat (limited to 'apps/audio_thread.c')
-rw-r--r--apps/audio_thread.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/audio_thread.c b/apps/audio_thread.c
index 2f01f7a8c2..56f3853c6c 100644
--- a/apps/audio_thread.c
+++ b/apps/audio_thread.c
@@ -79,6 +79,14 @@ static void NORETURN_ATTR audio_thread(void)
audio_playback_handler(&ev);
continue;
+ /* Playback has to handle these, even if not playing */
+ case Q_AUDIO_REMAKE_AUDIO_BUFFER:
+#ifdef HAVE_DISK_STORAGE
+ case Q_AUDIO_UPDATE_WATERMARK:
+#endif
+ audio_playback_handler(&ev);
+ break;
+
#ifdef AUDIO_HAVE_RECORDING
/* Starts the recording engine branch */
case Q_AUDIO_INIT_RECORDING:
@@ -132,10 +140,6 @@ void audio_init(void)
logf("audio: initializing");
- playback_init();
-
- /* Recording doesn't need init call */
-
/* Initialize queues before giving control elsewhere in case it likes
to send messages. Thread creation will be delayed however so nothing
starts running until ready if something yields such as talk_init. */
@@ -151,6 +155,9 @@ void audio_init(void)
queue_enable_queue_send(&audio_queue, &audio_queue_sender_list,
audio_thread_id);
+ playback_init();
+ /* Recording doesn't need init call */
+
/* ...now...audio_reset_buffer must know the size of voicefile buffer so
init talk first which will init the buffers */
talk_init();