Commit 4c27b234 authored by Alexandre Lision's avatar Alexandre Lision

coreaudio: use I/O unit

Use only one AudioUnit for input and output audio processing and
change the AudioUnit type to kAudioUnitSubType_VoiceProcessingIO
This is necessary to enable echo cancelation.

Change-Id: I2ea635da3e5bf23190a7b8c90861ffba53ff84f7
parent 05397dd4
This diff is collapsed.
......@@ -86,8 +86,10 @@ class CoreLayer : public AudioLayer {
return indexRing_;
}
void initAudioLayerPlayback();
void initAudioLayerCapture();
/**
* Configure the AudioUnit
*/
void initAudioLayerIO();
/**
* Start the capture stream and prepare the playback stream.
......@@ -164,8 +166,8 @@ class CoreLayer : public AudioLayer {
std::vector<AudioSample> playbackIBuff_;
std::vector<AudioSample> captureIBuff_;
AudioUnit outputUnit_;
AudioUnit inputUnit_;
AudioUnit ioUnit_;
std::shared_ptr<RingBuffer> mainRingBuffer_;
std::vector<AudioDevice> getDeviceList(bool getCapture) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment