diff --git a/src/media/audio/coreaudio/osx/corelayer.mm b/src/media/audio/coreaudio/osx/corelayer.mm index 50cb3d64b42710665aa53e4e93ebf9883acc3d54..fc91bd1e7c7f7b3637bf60760cc9c432e66c14d8 100644 --- a/src/media/audio/coreaudio/osx/corelayer.mm +++ b/src/media/audio/coreaudio/osx/corelayer.mm @@ -498,6 +498,20 @@ CoreLayer::getDeviceList(bool getCapture) const for (int i = 0; i < nDevices; ++i) { auto dev = AudioDevice {devids[i], getCapture}; if (dev.channels_ > 0) { // Channels < 0 if inactive. + //There is additional stream under the built-in device - the raw streams enabled by AUVP. + if (dev.name_.find("VPAUAggregateAudioDevice") != std::string::npos) { + //ignore VPAUAggregateAudioDevice + continue; + } + //for input device check if it not speaker + //since the speaker device has input stream for echo cancellation. + if (getCapture) { + auto devOutput = AudioDevice {devids[i], !getCapture}; + // it is output device + if (devOutput.channels_ > 0) { + continue; + } + } ret.push_back(std::move(dev)); } }