summaryrefslogtreecommitdiff
path: root/apps/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c49
1 files changed, 3 insertions, 46 deletions
diff --git a/apps/main.c b/apps/main.c
index fe15675c69..4f468fa65b 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -45,7 +45,6 @@
45#include "serial.h" 45#include "serial.h"
46#endif 46#endif
47#include "audio.h" 47#include "audio.h"
48#include "mp3_playback.h"
49#include "settings.h" 48#include "settings.h"
50#include "backlight.h" 49#include "backlight.h"
51#include "status.h" 50#include "status.h"
@@ -87,12 +86,10 @@
87#include "iap.h" 86#include "iap.h"
88#endif 87#endif
89 88
90#if (CONFIG_CODEC == SWCODEC)
91#include "audio_thread.h" 89#include "audio_thread.h"
92#include "playback.h" 90#include "playback.h"
93#include "tdspeed.h" 91#include "tdspeed.h"
94#endif 92#if defined(HAVE_RECORDING) && !defined(SIMULATOR)
95#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING) && !defined(SIMULATOR)
96#include "pcm_record.h" 93#include "pcm_record.h"
97#endif 94#endif
98 95
@@ -258,7 +255,7 @@ static void init_tagcache(void) INIT_ATTR;
258static void init_tagcache(void) 255static void init_tagcache(void)
259{ 256{
260 bool clear = false; 257 bool clear = false;
261#if 0 /* CONFIG_CODEC == SWCODEC */ 258#if 0
262 long talked_tick = 0; 259 long talked_tick = 0;
263#endif 260#endif
264 tagcache_init(); 261 tagcache_init();
@@ -269,7 +266,7 @@ static void init_tagcache(void)
269 266
270 if (ret > 0) 267 if (ret > 0)
271 { 268 {
272#if 0 /* FIXME: Audio isn't even initialized yet! */ /* CONFIG_CODEC == SWCODEC */ 269#if 0 /* FIXME: Audio isn't even initialized yet! */
273 /* hwcodec can't use voice here, as the database commit 270 /* hwcodec can't use voice here, as the database commit
274 * uses the audio buffer. */ 271 * uses the audio buffer. */
275 if(global_settings.talk_menu 272 if(global_settings.talk_menu
@@ -365,10 +362,8 @@ static void init(void)
365 viewportmanager_init(); 362 viewportmanager_init();
366 363
367 storage_init(); 364 storage_init();
368#if CONFIG_CODEC == SWCODEC
369 pcm_init(); 365 pcm_init();
370 dsp_init(); 366 dsp_init();
371#endif
372 settings_reset(); 367 settings_reset();
373 settings_load(SETTINGS_ALL); 368 settings_load(SETTINGS_ALL);
374 settings_apply(true); 369 settings_apply(true);
@@ -384,23 +379,6 @@ static void init(void)
384 playlist_init(); 379 playlist_init();
385 shortcuts_init(); 380 shortcuts_init();
386 381
387#if CONFIG_CODEC != SWCODEC
388 mp3_init( global_settings.volume,
389 global_settings.bass,
390 global_settings.treble,
391 global_settings.balance,
392 global_settings.loudness,
393 global_settings.avc,
394 global_settings.channel_config,
395 global_settings.stereo_width,
396 global_settings.mdb_strength,
397 global_settings.mdb_harmonics,
398 global_settings.mdb_center,
399 global_settings.mdb_shape,
400 global_settings.mdb_enable,
401 global_settings.superbass);
402#endif /* CONFIG_CODEC != SWCODEC */
403
404 if (global_settings.audioscrobbler) 382 if (global_settings.audioscrobbler)
405 scrobbler_init(); 383 scrobbler_init();
406 384
@@ -599,10 +577,8 @@ static void init(void)
599 } 577 }
600 } 578 }
601 579
602#if CONFIG_CODEC == SWCODEC
603 pcm_init(); 580 pcm_init();
604 dsp_init(); 581 dsp_init();
605#endif
606 582
607#if defined(SETTINGS_RESET) || (CONFIG_KEYPAD == IPOD_4G_PAD) || \ 583#if defined(SETTINGS_RESET) || (CONFIG_KEYPAD == IPOD_4G_PAD) || \
608 (CONFIG_KEYPAD == IRIVER_H10_PAD) 584 (CONFIG_KEYPAD == IRIVER_H10_PAD)
@@ -669,25 +645,6 @@ static void init(void)
669 645
670 shortcuts_init(); 646 shortcuts_init();
671 647
672#if CONFIG_CODEC != SWCODEC
673 /* No buffer allocation (see buffer.c) may take place after the call to
674 audio_init() since the mpeg thread takes the rest of the buffer space */
675 mp3_init( global_settings.volume,
676 global_settings.bass,
677 global_settings.treble,
678 global_settings.balance,
679 global_settings.loudness,
680 global_settings.avc,
681 global_settings.channel_config,
682 global_settings.stereo_width,
683 global_settings.mdb_strength,
684 global_settings.mdb_harmonics,
685 global_settings.mdb_center,
686 global_settings.mdb_shape,
687 global_settings.mdb_enable,
688 global_settings.superbass);
689#endif /* CONFIG_CODEC != SWCODEC */
690
691 CHART(">audio_init"); 648 CHART(">audio_init");
692 audio_init(); 649 audio_init();
693 CHART("<audio_init"); 650 CHART("<audio_init");