summaryrefslogtreecommitdiffstats
path: root/apps/main.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2013-05-31 02:41:02 -0400
committerMichael Sevakis <jethead71@rockbox.org>2013-05-31 03:20:35 -0400
commit5857c44017a1641fce7f00da7f16c143daacbaf6 (patch)
treeb8a7ff134977ee8dd6b25b5591f4eb81172f74ab /apps/main.c
parentdf6e1bcce5071e02b5cd46736bff87ca0dcceffe (diff)
downloadrockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.tar.gz
rockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.tar.bz2
rockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.zip
Refactor audio thread to run both recording and playback.
Eliminates the pcmrec thread and keeps playback and recording engine operation mutually-exclusive. audio_thread.c contains the audio thread which branches to the correct engine depending upon the request. It also handles the main audio initialization. Moves pcm_init into main.c just before dsp_init because I don't want that one in audio_init in the new file. (Also makes revision df6e1bc pointless ;) Change-Id: Ifc1db24404e6d8dd9ac42d9f4dfbc207aa9a26e1
Diffstat (limited to 'apps/main.c')
-rw-r--r--apps/main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/main.c b/apps/main.c
index 6b6566c7ca..57257aff66 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -87,6 +87,7 @@
#endif
#if (CONFIG_CODEC == SWCODEC)
+#include "audio_thread.h"
#include "playback.h"
#include "tdspeed.h"
#endif
@@ -386,6 +387,7 @@ static void init(void)
storage_init();
#if CONFIG_CODEC == SWCODEC
+ pcm_init();
dsp_init();
#endif
settings_reset();
@@ -422,10 +424,6 @@ static void init(void)
audio_init();
-#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING)
- pcm_rec_init();
-#endif
-
settings_apply_skins();
}
@@ -641,6 +639,7 @@ static void init(void)
}
#if CONFIG_CODEC == SWCODEC
+ pcm_init();
dsp_init();
#endif
@@ -727,10 +726,6 @@ static void init(void)
audio_init();
CHART("<audio_init");
-#if (CONFIG_CODEC == SWCODEC) && defined(HAVE_RECORDING)
- pcm_rec_init();
-#endif
-
/* runtime database has to be initialized after audio_init() */
cpu_boost(false);