- From: Chris Rogers <crogers@google.com>
- Date: Wed, 18 May 2011 16:28:48 -0700
- To: Cedric Vivier <cedricv@neonux.com>
- Cc: public-xg-audio@w3.org
- Message-ID: <BANLkTinutEaHgjWTJpKhk-mezQwDXHfxcQ@mail.gmail.com>
Hi Cedric, thanks for your comments. On Wed, May 18, 2011 at 3:04 AM, Cedric Vivier <cedricv@neonux.com> wrote: > Hi Chris, list, > > > Traditionally web/DOM APIs are language-independent, the API should > not have JavaScript-specific naming unless specifically required. > In this context, JavaScriptAudioNode doesn't sound good imho as in > fact its interface is compatible with any DOM implementation language. > > I propose it to be renamed RealtimeProcessorAudioNode, to reflect this > and bring symmetry with RealtimeAnalyserAudioNode. > Yes, I agree that JavaScriptAudioNode isn't really the best name. But, I'm not so fond of RealtimeProcessorAudioNode because effectively all of the AudioNodes are "real-time" in their normal usage. Perhaps something like CustomProcessorNode? > > > I'd also like to express my concerns over inconsistent naming in the spec. > Nodes (inheriting AudioNode) are sometimes named AudioSomething > (AudioChannelSplitter), other times are called SomethingNode > (DelayNode), and also some other times named AudioSomethingNode > (AudioPannerNode)... or SomethingAudioNode (JavaScriptAudioNode). > > I think we should rather follow a convention to make the API more > consistent and easier to use (mnemonics). > I propose every node (inheriting AudioNode) to be suffixed with > "AudioNode", such as examples above would become : > * ChannelSplitterAudioNode > * DelayAudioNode > * PannerAudioNode > It's true that the naming is not entirely consistent. I'm not really thrilled with the idea of using the complete "AudioNode" suffix since that seems a bit heavy. Instead I prefer "Node". > > Similarly all create<something> functions would be consistent/easier > to use, by following the convention it makes the name of created > objects always <something>AudioNode : > > BufferSourceAudioNode createBufferSource(); > RealtimeAnalyserNode createRealtimeAnalyser(); (instead of > createAnalyser) > DelayAudioNode createDelay(); (instead of createDelayNode) > > > Regards, > Once again, I would prefer the "Node" rather than "AudioNode" suffix. Since we're dealing in the namespace of an AudioContext, I think it's clear that the "Node" refers to an "AudioNode". Also, I prefer the name "AudioBufferSourceNode" as compared with "BufferSourceAudioNode" because there's actually a first class object called "AudioBuffer" which is important to the functioning of the node, so this naming seems more accurate. Chris
Received on Wednesday, 18 May 2011 23:29:14 UTC