From 98cd3e8868a54541dce9875dfaf04e2695a97c37 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Fri, 9 Mar 2007 12:30:14 +0000 Subject: Install the single stage synchronous audio initialization I cooked up awhile back. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12693 a1c6a512-1295-4272-9138-f99709370657 --- apps/main.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'apps/main.c') diff --git a/apps/main.c b/apps/main.c index fe397c737c..8ad32446b3 100644 --- a/apps/main.c +++ b/apps/main.c @@ -244,9 +244,6 @@ static void init(void) button_init(); backlight_init(); lang_init(); -#if CONFIG_CODEC == SWCODEC - audio_preinit(); /* Must be done before settings_apply() */ -#endif /* Must be done before any code uses the multi-screen APi */ screen_access_init(); gui_syncstatusbar_init(&statusbars); @@ -262,6 +259,8 @@ static void init(void) sleep(HZ/2); tree_init(); playlist_init(); + +#if CONFIG_CODEC != SWCODEC mp3_init( global_settings.volume, global_settings.bass, global_settings.treble, @@ -277,13 +276,12 @@ static void init(void) global_settings.mdb_enable, global_settings.superbass); - scrobbler_init(); - cuesheet_init(); - /* audio_init must to know the size of voice buffer so init voice first */ -#if CONFIG_CODEC == SWCODEC talk_init(); -#endif +#endif /* CONFIG_CODEC != SWCODEC */ + + scrobbler_init(); + cuesheet_init(); audio_init(); button_clear_queue(); /* Empty the keyboard buffer */ @@ -365,10 +363,6 @@ static void init(void) powermgmt_init(); -#if CONFIG_CODEC == SWCODEC - audio_preinit(); -#endif - #if CONFIG_TUNER radio_init(); #endif @@ -499,6 +493,7 @@ static void init(void) scrobbler_init(); cuesheet_init(); +#if CONFIG_CODEC != SWCODEC /* No buffer allocation (see buffer.c) may take place after the call to audio_init() since the mpeg thread takes the rest of the buffer space */ mp3_init( global_settings.volume, @@ -518,8 +513,10 @@ static void init(void) /* audio_init must to know the size of voice buffer so init voice first */ talk_init(); +#endif /* CONFIG_CODEC != SWCODEC */ audio_init(); + #if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && !defined(SIMULATOR) pcm_rec_init(); #endif -- cgit v1.2.3