Closed ghost closed 2 years ago
The getters would be #8
Will give this a try soon, would potentially be a large change to how webaudio works so (Might make it so streams are only created when you first transmit data toward them, which would allow for set3DEnabled to also effect if the stream is initially 2d/3d in the first place in sound.playURL)
Not real 3d, but it works for 99% of the use-cases anyways. I ported gmod's Set3DEnabled in https://github.com/Vurv78/WebAudio/commit/49c215a4b353d84368b945e593cb9677396f975b. I wanted to have webaudio streams be able to swap between 2d and 3d but that'd be way too much work just to support a small amount of audio that doesn't support 3d for some reason
IGModAudioChannel includes various other functions that could be useful when making E2s, such as:
IGModAudioChannel:GetTime()
IGModAudioChannel:Set3DEnabled()
Getting the time would be useful for making player bar indicators which move relative to the sound's progress, and the option to enable/disable 3D sound would be useful for music players where 3D sound is disorientating or other instances where it is unwanted.