Skip to content

Conversation

rtoy
Copy link
Member

@rtoy rtoy commented Jun 23, 2016

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.

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.
@rtoy
Copy link
Member Author

rtoy commented Jun 23, 2016

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.

@rtoy
Copy link
Member Author

rtoy commented Jun 23, 2016

Well, maybe for simplicity (?) we could have maxChannelCount be equal to channelCount. Then OfflineAudioDestinationNode could be a subclass of AudioDestinationNode.

@joeberkovitz
Copy link

@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.

@rtoy
Copy link
Member Author

rtoy commented Aug 1, 2016

I'm ok with either approach.

It was suggested by @hoch in #824 (comment) and agreed upon by @padenot to create an OfflineAudioDestinationNode. I have a slight preference to make OfflineAudioDestinationNode a subclass of AudioDestinationNode and making maxChannels be set to number of channels used to create the offline context.

@joeberkovitz
Copy link

Your simplified approach to an OfflineAudioDestinationNode subclass is likewise fine with me.

Raymond Toy added 2 commits August 3, 2016 12:50
@joeberkovitz
Copy link

This looks good to me. I'm not sure if it's ready for merge...?

@rtoy
Copy link
Member Author

rtoy commented Sep 2, 2016

No, it's not yet ready to merge because the current text doesn't define OfflineAudioDestinationNode as a subclass of AudioDestinationNode. Plus, need to clarify maxChannels for OfflineAudioDestinationNode.

@rtoy
Copy link
Member Author

rtoy commented Sep 15, 2016

If #968 is implemented, then there isn't really a need for a separate OfflineAudioDestination.

@rtoy
Copy link
Member Author

rtoy commented Sep 27, 2016

Closing this. The restriction on the channel count and mode will be handled when #968 is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants