Vurv78 / WebAudio

A safe, efficient and powerful replacement for Streamcore that adds playing & manipulating URL streams through IGmodAudioChannel/BASS
https://steamcommunity.com/sharedfiles/filedetails/?id=2466875474
MIT License
18 stars 3 forks source link

Add set3D #11

Closed ghost closed 2 years ago

ghost commented 3 years ago

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.

Vurv78 commented 3 years ago

The getters would be #8

Vurv78 commented 3 years ago

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)

Vurv78 commented 2 years ago

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