Bug 1395593 - Don't query the maximum channel count in ::PlayAudio using cubeb. r=achronop

MozReview-Commit-ID: 97ri5vhzsRF

--HG--
extra : rebase_source : 56bc0f44566dfc3e271444f8dfc9f89e12a1a0a1
This commit is contained in:
Paul Adenot 2017-08-31 17:14:34 +02:00
Родитель 42a9c3e932
Коммит 097de34e5b
2 изменённых файлов: 8 добавлений и 1 удалений

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

@ -445,6 +445,12 @@ public:
return this;
}
uint32_t OutputChannelCount()
{
MOZ_ASSERT(mOuputChannels != 0 && mOuputChannels <= 8);
return mOuputChannels;
}
/* Enqueue a promise that is going to be resolved when a specific operation
* occurs on the cubeb stream. */
void EnqueueStreamAndPromiseForOperation(MediaStream* aStream,

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

@ -948,7 +948,8 @@ MediaStreamGraphImpl::PlayAudio(MediaStream* aStream)
// Need unique id for stream & track - and we want it to match the inserter
output.WriteTo(LATENCY_STREAM_ID(aStream, track->GetID()),
mMixer, AudioChannelCount(),
mMixer,
CurrentDriver()->AsAudioCallbackDriver()->OutputChannelCount(),
mSampleRate);
}
return ticksWritten;