summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-03-09 12:30:14 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-03-09 12:30:14 +0000
commit98cd3e8868a54541dce9875dfaf04e2695a97c37 (patch)
tree1bd3c9ead8c83baba4e735f437e8c63dc4391449 /apps/main.c
parent8e7ab3dfffe3cec8716f0842c0c9dca152402eb7 (diff)
downloadrockbox-98cd3e8868a54541dce9875dfaf04e2695a97c37.tar.gz
rockbox-98cd3e8868a54541dce9875dfaf04e2695a97c37.zip
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
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c21
1 files changed, 9 insertions, 12 deletions
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)
244 button_init(); 244 button_init();
245 backlight_init(); 245 backlight_init();
246 lang_init(); 246 lang_init();
247#if CONFIG_CODEC == SWCODEC
248 audio_preinit(); /* Must be done before settings_apply() */
249#endif
250 /* Must be done before any code uses the multi-screen APi */ 247 /* Must be done before any code uses the multi-screen APi */
251 screen_access_init(); 248 screen_access_init();
252 gui_syncstatusbar_init(&statusbars); 249 gui_syncstatusbar_init(&statusbars);
@@ -262,6 +259,8 @@ static void init(void)
262 sleep(HZ/2); 259 sleep(HZ/2);
263 tree_init(); 260 tree_init();
264 playlist_init(); 261 playlist_init();
262
263#if CONFIG_CODEC != SWCODEC
265 mp3_init( global_settings.volume, 264 mp3_init( global_settings.volume,
266 global_settings.bass, 265 global_settings.bass,
267 global_settings.treble, 266 global_settings.treble,
@@ -277,13 +276,12 @@ static void init(void)
277 global_settings.mdb_enable, 276 global_settings.mdb_enable,
278 global_settings.superbass); 277 global_settings.superbass);
279 278
280 scrobbler_init();
281 cuesheet_init();
282
283 /* audio_init must to know the size of voice buffer so init voice first */ 279 /* audio_init must to know the size of voice buffer so init voice first */
284#if CONFIG_CODEC == SWCODEC
285 talk_init(); 280 talk_init();
286#endif 281#endif /* CONFIG_CODEC != SWCODEC */
282
283 scrobbler_init();
284 cuesheet_init();
287 285
288 audio_init(); 286 audio_init();
289 button_clear_queue(); /* Empty the keyboard buffer */ 287 button_clear_queue(); /* Empty the keyboard buffer */
@@ -365,10 +363,6 @@ static void init(void)
365 363
366 powermgmt_init(); 364 powermgmt_init();
367 365
368#if CONFIG_CODEC == SWCODEC
369 audio_preinit();
370#endif
371
372#if CONFIG_TUNER 366#if CONFIG_TUNER
373 radio_init(); 367 radio_init();
374#endif 368#endif
@@ -499,6 +493,7 @@ static void init(void)
499 scrobbler_init(); 493 scrobbler_init();
500 cuesheet_init(); 494 cuesheet_init();
501 495
496#if CONFIG_CODEC != SWCODEC
502 /* No buffer allocation (see buffer.c) may take place after the call to 497 /* No buffer allocation (see buffer.c) may take place after the call to
503 audio_init() since the mpeg thread takes the rest of the buffer space */ 498 audio_init() since the mpeg thread takes the rest of the buffer space */
504 mp3_init( global_settings.volume, 499 mp3_init( global_settings.volume,
@@ -518,8 +513,10 @@ static void init(void)
518 513
519 /* audio_init must to know the size of voice buffer so init voice first */ 514 /* audio_init must to know the size of voice buffer so init voice first */
520 talk_init(); 515 talk_init();
516#endif /* CONFIG_CODEC != SWCODEC */
521 517
522 audio_init(); 518 audio_init();
519
523#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && !defined(SIMULATOR) 520#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && !defined(SIMULATOR)
524 pcm_rec_init(); 521 pcm_rec_init();
525#endif 522#endif