Handle recording without using MediaRecorder
MediaRecorder creates a new AudioRecord for the tuner internally and
causes two audio input devices to be in-use during recording. Replace
MediaRecorder with a custom recorder that gets fed by the same
AudioRecord instance used for playback when SW rendering is in affect.
This change helps workaround some bugs in the Audio HAL during fm
recording (two tuner input devices) and concurrent mic recording.
Force SW rendering when recording starts so that the recorder works
and attempt to start the audio patch when recording ends.
In onAudioPatchListUpdate there is no need to call
initAudioRecordSink() before calling startRender() because
startRender() will call initAudioRecordSink().
CYNGNOS-2819, KIPPER-687, FEIJ-1372
Change-Id: Iddd9f325892ca4482c3977dcadc627352e6f5bb2
3 files changed