mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Backed out changeset e0bab3ab79ff (bug 971528) for asan mda failures on a CLOSED TREE
This commit is contained in:
parent
d5910216dc
commit
eff0fbf63b
@ -662,19 +662,10 @@ AudioCallbackDriver::Init()
|
||||
latency_frames = std::max((uint32_t) 512, latency_frames);
|
||||
}
|
||||
|
||||
input = output;
|
||||
input.channels = mInputChannels;
|
||||
input.layout = CUBEB_LAYOUT_UNDEFINED;
|
||||
|
||||
#ifdef MOZ_WEBRTC
|
||||
if (mGraphImpl->mInputWanted) {
|
||||
StaticMutexAutoLock lock(AudioInputCubeb::Mutex());
|
||||
uint32_t maxInputChannels = 0;
|
||||
if (AudioInputCubeb::GetDeviceMaxChannels(mGraphImpl->mInputDeviceID, maxInputChannels) == 0) {
|
||||
input.channels = mInputChannels = maxInputChannels;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
input = output;
|
||||
input.channels = mInputChannels; // change to support optional stereo capture
|
||||
input.layout = CUBEB_LAYOUT_MONO;
|
||||
|
||||
cubeb_stream* stream = nullptr;
|
||||
CubebUtils::AudioDeviceID input_id = nullptr, output_id = nullptr;
|
||||
|
@ -212,7 +212,6 @@ public:
|
||||
aIndex = mDefaultDevice;
|
||||
}
|
||||
}
|
||||
MOZ_ASSERT(mDeviceIndexes);
|
||||
if (aIndex < 0 || aIndex >= (int) mDeviceIndexes->Length()) {
|
||||
return -1;
|
||||
}
|
||||
@ -268,20 +267,6 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int GetDeviceMaxChannels(int aDeviceIndex, uint32_t& aChannels)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
aChannels = 1;
|
||||
#else
|
||||
int32_t devindex = DeviceIndex(aDeviceIndex);
|
||||
if (!mDevices || devindex < 0) {
|
||||
return 1;
|
||||
}
|
||||
aChannels = mDevices->device[devindex]->max_channels;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
void StartRecording(SourceMediaStream *aStream, AudioDataListener *aListener)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
|
Loading…
Reference in New Issue
Block a user