KHR_audio_emitter: Add pitchSpeed and make audio source's data optional#239
Conversation
f9b11ac to
2941077
Compare
2941077 to
758ef2d
Compare
yankscally
left a comment
There was a problem hiding this comment.
pitchSpeed... in one way, the name is illogical, but in another way, I can eyeball it and know what it means - unlike playbackRate. In the audio realm, this has many names also, so there is no concrete naming scheme for this, it's usually whatever makes the most sense in that context.
Approved.
|
Ya "pitchSpeed" is a strange name for this. I see this and instantly wonder what units it takes. Does it take cents for a pitch? Or does it take a multiplier? It's not clear from the name alone which one it is. I feel like playbackRate or playbackSpeed would be better. |
Heh, ya "cents" are a logarithmic unit of pitch measurement that musicians use that corresponds to the way we perceive the 12 pitches used in Western music. We perceive them as linear changes up and down the pitch range even though the actual frequency rate change is logarithmic. The ear is weird like this. See https://en.wikipedia.org/wiki/Cent_(music) for details. |
This PR has 2 changes in it:
"pitchSpeed"property to audio sources.playbackRate: https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/playbackRate"OMI_audio_ogg_vorbis"because they provide their own audio data separately in a new field. But if the built-in field is empty, it's technically invalid with the spec in master.