Bug 1018825 - Special check for content channel when the channel is hidden. r=mchen

This commit is contained in:
Star Cheng 2014-07-28 18:55:51 +08:00
parent f9ab9f9ea7
commit aa1a273275

View File

@ -586,14 +586,18 @@ AudioChannelService::SendAudioChannelChangedNotification(uint64_t aChildID)
kMozAudioChannelAttributeTable[index].value > higher &&
kMozAudioChannelAttributeTable[index].value > (int16_t)AudioChannel::Normal;
--index) {
if (kMozAudioChannelAttributeTable[index].value == (int16_t)AudioChannel::Content &&
mPlayableHiddenContentChildID != CONTENT_PROCESS_ID_UNKNOWN) {
higher = kMozAudioChannelAttributeTable[index].value;
}
// Each channel type will be split to fg and bg for recording the state,
// so here need to do a translation.
if (!mChannelCounters[index * 2 + 1].IsEmpty()) {
if (mChannelCounters[index * 2 + 1].IsEmpty()) {
continue;
}
if (kMozAudioChannelAttributeTable[index].value == (int16_t)AudioChannel::Content) {
if (mPlayableHiddenContentChildID != CONTENT_PROCESS_ID_UNKNOWN) {
higher = kMozAudioChannelAttributeTable[index].value;
break;
}
} else {
higher = kMozAudioChannelAttributeTable[index].value;
break;
}