From 0293dba5d28c336d2438660f194bd6b9a2f00a90 Mon Sep 17 00:00:00 2001 From: Magnus Holmgren Date: Sun, 16 Oct 2005 12:05:58 +0000 Subject: [PATCH] iRiver: The audio init fix caused problems if a voice file was present. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7635 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index 7c8339f3d3..d38e1f4527 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1889,6 +1889,9 @@ void voice_codec_thread(void) void voice_init(void) { + if (!filebuf) + return; /* Audio buffers not yet set up */ + while (voice_codec_loaded) { logf("Terminating voice codec"); @@ -2291,16 +2294,16 @@ void audio_init(void) queue_init(&codec_queue); queue_init(&voice_codec_queue); - /* Apply relevant settings */ - audio_set_buffer_margin(global_settings.buffer_margin); - audio_set_crossfade(global_settings.crossfade); - create_thread(codec_thread, codec_stack, sizeof(codec_stack), codec_thread_name); create_thread(voice_codec_thread, voice_codec_stack, sizeof(voice_codec_stack), voice_codec_thread_name); create_thread(audio_thread, audio_stack, sizeof(audio_stack), audio_thread_name); + + /* Apply relevant settings */ + audio_set_buffer_margin(global_settings.buffer_margin); + audio_set_crossfade(global_settings.crossfade); }