mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1290075: Always Init() the VoiceEngine when enumerating audio inputs r=jib
This commit is contained in:
parent
94b1da6b55
commit
fd8a8c3c74
@ -108,7 +108,6 @@ MediaEngineWebRTC::MediaEngineWebRTC(MediaEnginePrefs &aPrefs)
|
||||
: mMutex("mozilla::MediaEngineWebRTC"),
|
||||
mVoiceEngine(nullptr),
|
||||
mAudioInput(nullptr),
|
||||
mAudioEngineInit(false),
|
||||
mFullDuplex(aPrefs.mFullDuplex),
|
||||
mExtendedFilter(aPrefs.mExtendedFilter),
|
||||
mDelayAgnostic(aPrefs.mDelayAgnostic)
|
||||
@ -349,11 +348,12 @@ MediaEngineWebRTC::EnumerateAudioDevices(dom::MediaSourceEnum aMediaSource,
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mAudioEngineInit) {
|
||||
if (ptrVoEBase->Init() < 0) {
|
||||
return;
|
||||
}
|
||||
mAudioEngineInit = true;
|
||||
// Always re-init the voice engine, since if we close the last use we
|
||||
// DeInitEngine() and Terminate(), which shuts down Process() - but means
|
||||
// we have to Init() again before using it. Init() when already inited is
|
||||
// just a no-op, so call always.
|
||||
if (ptrVoEBase->Init() < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mAudioInput) {
|
||||
|
@ -599,7 +599,6 @@ private:
|
||||
webrtc::VoiceEngine* mVoiceEngine;
|
||||
webrtc::Config mConfig;
|
||||
RefPtr<mozilla::AudioInput> mAudioInput;
|
||||
bool mAudioEngineInit;
|
||||
bool mFullDuplex;
|
||||
bool mExtendedFilter;
|
||||
bool mDelayAgnostic;
|
||||
|
Loading…
Reference in New Issue
Block a user