From 344b9d09860af193a0a297438432339f4108c574 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 31 May 2013 04:13:39 -0400 Subject: 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 --- apps/audio_thread.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'apps/audio_thread.c') 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(); -- cgit v1.2.3