W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

[web-audio-api] Node creation method naming inconsistencies (#166)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:28:45 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/166@github.com>
> Originally reported on W3C Bugzilla [ISSUE-18332](https://www.w3.org/Bugs/Public/show_bug.cgi?id=18332) Thu, 19 Jul 2012 13:40:33 GMT
> Reported by Marcus Geelnard (Opera)
> Assigned to 

http://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section

The methods for creating different AudioNodes use inconsistent naming conventions. Here is a list of current method -> type mappings:

createBufferSource -> AudioBufferSourceNode
createMediaElementSource -> MediaElementAudioSourceNode
createMediaStreamSource -> MediaStreamAudioSourceNode
createJavaScriptNode -> JavaScriptAudioNode
createAnalyser -> RealtimeAnalyserNode
createGainNode -> AudioGainNode
createDelayNode -> DelayNode
createBiquadFilter -> BiquadFilterNode
createPanner -> AudioPannerNode
createConvolver -> ConvolverNode
createChannelSplitter -> AudioChannelSplitter
createChannelMerger -> AudioChannelMerger
createDynamicsCompressor -> DynamicsCompressorNode
createOscillator -> Oscillator

Apart from the inconsistently named AudioNode interfaces (see Bug 17407), the constructors also use a fair mix of:

* Complete interface name, e.g. createDelayNode and createOscillator
* With Node suffix, e.g. createGainNode, createDelayNode
* Without Node suffix, e.g. createBufferSource, createConvolver
* With key parts of the name dropped, e.g. createAnalyzer

The only consistency I can see is that any occurrences of "Audio" in the interface names have been dropped in the create-method names.

Suggestion: Include the entire interface name, possibly excluding Audio prefix and/or Node suffix (as long as it's the same for all methods).

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/166
Received on Wednesday, 11 September 2013 14:29:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:23 UTC