Bug 1195051 - Part 1: Do not unmute the destination node as soon as the AudioContext is constructed; r=padenot

This commit is contained in:
Ehsan Akhgari 2015-08-15 18:35:13 -04:00
Родитель 3aabee4abb
Коммит 53b1ca8619
1 изменённых файлов: 5 добавлений и 6 удалений

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

@ -243,7 +243,7 @@ public:
explicit DestinationNodeEngine(AudioDestinationNode* aNode)
: AudioNodeEngine(aNode)
, mVolume(1.0f)
, mLastInputMuted(false)
, mLastInputMuted(true)
{
MOZ_ASSERT(aNode);
}
@ -613,10 +613,6 @@ AudioDestinationNode::CreateAudioChannelAgent()
static_cast<int32_t>(mAudioChannel),
this);
// The AudioChannelAgent must start playing immediately in order to avoid
// race conditions with mozinterruptbegin/end events.
InputMuted(false);
WindowAudioCaptureChanged();
}
@ -692,7 +688,10 @@ AudioDestinationNode::InputMuted(bool aMuted)
MOZ_ASSERT(Context() && !Context()->IsOffline());
if (!mAudioChannelAgent) {
return;
if (aMuted) {
return;
}
CreateAudioChannelAgent();
}
if (aMuted) {