summaryrefslogtreecommitdiff
path: root/apps/recorder/recording.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/recorder/recording.c
parentdf6e1bcce5071e02b5cd46736bff87ca0dcceffe (diff)
downloadrockbox-5857c44017a1641fce7f00da7f16c143daacbaf6.tar.gz
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/recorder/recording.c')
-rw-r--r--apps/recorder/recording.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index 203c7101b7..53dc5cbf95 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -1074,10 +1074,6 @@ bool recording_screen(bool no_source)
1074#endif 1074#endif
1075 1075
1076#if CONFIG_CODEC == SWCODEC 1076#if CONFIG_CODEC == SWCODEC
1077 /* This should be done before touching audio settings */
1078 while (!pcm_is_initialized())
1079 sleep(0);
1080
1081 /* recording_menu gets messed up: so prevent manus talking */ 1077 /* recording_menu gets messed up: so prevent manus talking */
1082 talk_disable(true); 1078 talk_disable(true);
1083 /* audio_init_recording stops anything playing when it takes the audio 1079 /* audio_init_recording stops anything playing when it takes the audio
@@ -1209,11 +1205,6 @@ bool recording_screen(bool no_source)
1209 trig_width[i] = vp_top[i].width - pm_x[i]; 1205 trig_width[i] = vp_top[i].width - pm_x[i];
1210 } 1206 }
1211 1207
1212#if CONFIG_CODEC == SWCODEC
1213 audio_close_recording();
1214 audio_init_recording();
1215#endif
1216
1217 rec_init_recording_options(&rec_options); 1208 rec_init_recording_options(&rec_options);
1218 rec_set_recording_options(&rec_options); 1209 rec_set_recording_options(&rec_options);
1219 1210