diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-05-31 04:13:39 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-05-31 04:13:39 -0400 |
commit | 344b9d09860af193a0a297438432339f4108c574 (patch) | |
tree | 6178600bfbfb140bf20475ce578ff4748fdf4630 /apps/audio_thread.c | |
parent | 5857c44017a1641fce7f00da7f16c143daacbaf6 (diff) | |
download | rockbox-344b9d09860af193a0a297438432339f4108c574.tar.gz 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.c | 15 |
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) | |||
79 | audio_playback_handler(&ev); | 79 | audio_playback_handler(&ev); |
80 | continue; | 80 | continue; |
81 | 81 | ||
82 | /* Playback has to handle these, even if not playing */ | ||
83 | case Q_AUDIO_REMAKE_AUDIO_BUFFER: | ||
84 | #ifdef HAVE_DISK_STORAGE | ||
85 | case Q_AUDIO_UPDATE_WATERMARK: | ||
86 | #endif | ||
87 | audio_playback_handler(&ev); | ||
88 | break; | ||
89 | |||
82 | #ifdef AUDIO_HAVE_RECORDING | 90 | #ifdef AUDIO_HAVE_RECORDING |
83 | /* Starts the recording engine branch */ | 91 | /* Starts the recording engine branch */ |
84 | case Q_AUDIO_INIT_RECORDING: | 92 | case Q_AUDIO_INIT_RECORDING: |
@@ -132,10 +140,6 @@ void audio_init(void) | |||
132 | 140 | ||
133 | logf("audio: initializing"); | 141 | logf("audio: initializing"); |
134 | 142 | ||
135 | playback_init(); | ||
136 | |||
137 | /* Recording doesn't need init call */ | ||
138 | |||
139 | /* Initialize queues before giving control elsewhere in case it likes | 143 | /* Initialize queues before giving control elsewhere in case it likes |
140 | to send messages. Thread creation will be delayed however so nothing | 144 | to send messages. Thread creation will be delayed however so nothing |
141 | starts running until ready if something yields such as talk_init. */ | 145 | starts running until ready if something yields such as talk_init. */ |
@@ -151,6 +155,9 @@ void audio_init(void) | |||
151 | queue_enable_queue_send(&audio_queue, &audio_queue_sender_list, | 155 | queue_enable_queue_send(&audio_queue, &audio_queue_sender_list, |
152 | audio_thread_id); | 156 | audio_thread_id); |
153 | 157 | ||
158 | playback_init(); | ||
159 | /* Recording doesn't need init call */ | ||
160 | |||
154 | /* ...now...audio_reset_buffer must know the size of voicefile buffer so | 161 | /* ...now...audio_reset_buffer must know the size of voicefile buffer so |
155 | init talk first which will init the buffers */ | 162 | init talk first which will init the buffers */ |
156 | talk_init(); | 163 | talk_init(); |