Bug 1183033 - Don't mute the system channel type. r=baku

This commit is contained in:
Alastor Wu 2015-10-20 20:42:24 +08:00
parent a7fc782b6e
commit 8fb6a2c8e0
2 changed files with 9 additions and 1 deletions

View File

@ -774,6 +774,11 @@ AudioChannelService::SetAudioChannelMuted(nsPIDOMWindow* aWindow,
MOZ_ASSERT(aWindow);
MOZ_ASSERT(aWindow->IsOuterWindow());
if (aAudioChannel == AudioChannel::System) {
// Workaround for bug1183033, system channel type can always playback.
return;
}
AudioChannelWindow* winData = GetOrCreateWindowData(aWindow);
winData->mChannels[(uint32_t)aAudioChannel].mMuted = aMuted;
RefreshAgentsVolume(aWindow);

View File

@ -175,7 +175,10 @@ private:
{
explicit AudioChannelWindow(uint64_t aWindowID)
: mWindowID(aWindowID)
{}
{
// Workaround for bug1183033, system channel type can always playback.
mChannels[(int16_t)AudioChannel::System].mMuted = false;
}
uint64_t mWindowID;
AudioChannelConfig mChannels[NUMBER_OF_AUDIO_CHANNELS];