Bug 1036431 - Setting AudioContext.mozAudioChannelType should set the audiochannel in mStream as well, r=ehsan

This commit is contained in:
Andrea Marchesini 2014-07-30 12:26:12 +01:00
Родитель 909d33279c
Коммит 1054e1f42a
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -329,7 +329,6 @@ AudioDestinationNode::AudioDestinationNode(AudioContext* aContext,
static_cast<AudioNodeEngine*>(new DestinationNodeEngine(this));
mStream = graph->CreateAudioNodeStream(engine, MediaStreamGraph::EXTERNAL_STREAM);
mStream->SetAudioChannelType(aChannel);
mStream->AddMainThreadListener(this);
mStream->AddAudioOutput(&gWebAudioOutputKey);
@ -539,6 +538,10 @@ AudioDestinationNode::SetMozAudioChannelType(AudioChannel aValue, ErrorResult& a
CheckAudioChannelPermissions(aValue)) {
mAudioChannel = aValue;
if (mStream) {
mStream->SetAudioChannelType(mAudioChannel);
}
if (mAudioChannelAgent) {
CreateAudioChannelAgent();
}