Backed out changeset e0bab3ab79ff (bug 971528) for asan mda failures on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2017-04-27 13:02:47 +02:00
Родитель d5910216dc
Коммит eff0fbf63b
2 изменённых файлов: 3 добавлений и 27 удалений

Просмотреть файл

@ -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