1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2013-05-31 02:41:02 -04:00
parent df6e1bcce5
commit 5857c44017
11 changed files with 553 additions and 564 deletions

View file

@ -1074,10 +1074,6 @@ bool recording_screen(bool no_source)
#endif
#if CONFIG_CODEC == SWCODEC
/* This should be done before touching audio settings */
while (!pcm_is_initialized())
sleep(0);
/* recording_menu gets messed up: so prevent manus talking */
talk_disable(true);
/* audio_init_recording stops anything playing when it takes the audio
@ -1209,11 +1205,6 @@ bool recording_screen(bool no_source)
trig_width[i] = vp_top[i].width - pm_x[i];
}
#if CONFIG_CODEC == SWCODEC
audio_close_recording();
audio_init_recording();
#endif
rec_init_recording_options(&rec_options);
rec_set_recording_options(&rec_options);