-
Notifications
You must be signed in to change notification settings - Fork 171
Fix #824: add OfflineAudioDestinationNode #856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #824: add OfflineAudioDestinationNode #856
Conversation
Add OfflineAudioDestinationNode so we can specify that the channel count and channel mode cannot be changed after construction. Also, explicitly state that the channel count is the number of channels specified by the constructor.
PTAL. This basically defines the offline destination node. I'm not sure, but think to do this right, we need to change BaseAudioContext so that the destination attribute is a BaseAudioDestinationNode and then define that AudioDestinationNode and OfflineAudioDestinationNode are subclasses. We can't have OfflineAudioDestinationNode be a subclass of AudioDestinationNode because the latter has a maxChannels attribute that doesn't make sense for an OfflineAudioDestinationNode. |
Well, maybe for simplicity (?) we could have maxChannelCount be equal to channelCount. Then OfflineAudioDestinationNode could be a subclass of AudioDestinationNode. |
@rtoy I do not think we even need a new subclass here. We can instead specify that 1) maxChannelCount is always channelCount, and 2) the AudioDestinationNode for an OfflineAudioContext throws NotSupportedException on any attempt to modify its channelCount. |
I'm ok with either approach. It was suggested by @hoch in #824 (comment) and agreed upon by @padenot to create an |
Your simplified approach to an |
AudioDestinationNode. Add text say maxChannelCount is set to channelCount.
This looks good to me. I'm not sure if it's ready for merge...? |
No, it's not yet ready to merge because the current text doesn't define |
If #968 is implemented, then there isn't really a need for a separate OfflineAudioDestination. |
Closing this. The restriction on the channel count and mode will be handled when #968 is fixed. |
Add OfflineAudioDestinationNode so we can specify that the channel
count and channel mode cannot be changed after construction. Also,
explicitly state that the channel count is the number of channels
specified by the constructor.