Add ChannelMergerNode

This commit is contained in:
Manish Goregaokar 2018-09-03 18:51:15 +05:30
parent 91b8cbe1db
commit 03d6fb18da
4 changed files with 110 additions and 0 deletions

View file

@ -218,6 +218,11 @@ impl AudioNodeMethods for AudioNode {
return Err(Error::NotSupported)
}
}
EventTargetTypeId::AudioNode(AudioNodeTypeId::ChannelMergerNode) => {
if value != 1 {
return Err(Error::InvalidState)
}
}
// XXX We do not support any of the other AudioNodes with
// constraints yet. Add more cases here as we add support
// for new AudioNodes.
@ -256,6 +261,11 @@ impl AudioNodeMethods for AudioNode {
return Err(Error::NotSupported)
}
}
EventTargetTypeId::AudioNode(AudioNodeTypeId::ChannelMergerNode) => {
if value != ChannelCountMode::Explicit {
return Err(Error::InvalidState)
}
}
// XXX We do not support any of the other AudioNodes with
// constraints yet. Add more cases here as we add support
// for new AudioNodes.