You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Playing an audio file that doesn't support 3D will still result in BASS_ERROR_NO3D despite disabling it webaudio:set3DEnabled(0). This is due to the bug where BASS cannot play AAC codec streams in 3D https://github.com/Facepunch/garrysmod-issues/issues/2296. This is a shame because Youtube uses AAC codec streams and thus isn't directly playable with WebAudio. Streamcore fixes this and it isn't at all an issue (read end of expected behavior).
To Reproduce
Paste down the following code in Expression 2
(The audio was fetched directly from Youtube, but I've downloaded it and put it on Dropbox since Youtube expires the raw audio link after a while)
if (first()) {
localUrl="https://dl.dropboxusercontent.com/s/olo98rrd1c3w5t4/videoplayback.weba"localAudio=webAudio(Url)
Audio:set3DEnabled(0)
Audio:setParent(entity())
Audio:play()
}
Then open console and you should see the following error: [WA]: Error when creating WebAudio receiver with id n, Error [BASS_ERROR_NO3D]
Expected behavior
WebAudio should remove the "3d" flag when calling sound.PlayURL if 3D is not enabled. Currently, WebAudio just sets the sound's position on top of the player to mimic 2D which is weird considering removing the "3d" flag would already accomplish the effect. The volume of the 2D sound would just have to be set to 0 when the client leaves the listening radius. Streamcore does something similar by lowering the volume the farther the client is from the sound.
Desktop (please complete the following information):
OS: Windows
Gmod Branch: x86-64
The text was updated successfully, but these errors were encountered:
This is because it directly maps to IGmodAudioChannel:Set3dEnabled.
The reason why this hasn't been done is because it'd involve creating the object asynchronously, or would have to be done in the actual webAudio constructor because that's where the object is transmitted to be created on the client
I mean all that needs to be done is adding constants for bass flags and then adding it to the constructor if you someone wants to do it, maybe I'll get to it eventually
It could be setup so it's always 2D and then 3D is simulated by adjusting the volume depending on the client's distance to the sound. Having 3D disabled would just mean not adjusting the volume.
I'm unsure however if updating the volume too often is a great idea.
Describe the bug
Playing an audio file that doesn't support 3D will still result in BASS_ERROR_NO3D despite disabling it
webaudio:set3DEnabled(0)
. This is due to the bug where BASS cannot play AAC codec streams in 3D https://github.com/Facepunch/garrysmod-issues/issues/2296. This is a shame because Youtube uses AAC codec streams and thus isn't directly playable with WebAudio. Streamcore fixes this and it isn't at all an issue (read end of expected behavior).To Reproduce
Paste down the following code in Expression 2
(The audio was fetched directly from Youtube, but I've downloaded it and put it on Dropbox since Youtube expires the raw audio link after a while)
Then open console and you should see the following error:
[WA]: Error when creating WebAudio receiver with id n, Error [BASS_ERROR_NO3D]
Expected behavior
WebAudio should remove the "3d" flag when calling
sound.PlayURL
if 3D is not enabled. Currently, WebAudio just sets the sound's position on top of the player to mimic 2D which is weird considering removing the "3d" flag would already accomplish the effect. The volume of the 2D sound would just have to be set to 0 when the client leaves the listening radius. Streamcore does something similar by lowering the volume the farther the client is from the sound.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: