Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last update (#12) causes streams to be too quiet & range does not work #13

Closed
ghost opened this issue Apr 30, 2021 · 5 comments · Fixed by #14
Closed

Last update (#12) causes streams to be too quiet & range does not work #13

ghost opened this issue Apr 30, 2021 · 5 comments · Fixed by #14

Comments

@ghost
Copy link

ghost commented Apr 30, 2021

The last update (#12) causes streams to have very a low volume (the volume does change when webaudio:volume() is used, but the stream is very quiet), and the audio can be heard regardless of distance from E2 to player. Setting the range seems to make no difference to this.

@Vurv78
Copy link
Owner

Vurv78 commented Apr 30, 2021

I was hoping this wouldn't be the case but I couldn't find any documentation as to why Set3DFadeDistance is so weird or how to use it properly.

It was working fine for me, maybe I'll have to make a modular think hook system for the receiver which will be annoying.. but worth it for future editions and so we don't have constant timers running that do nothing like most addons do

@ghost
Copy link
Author

ghost commented Apr 30, 2021

I noticed that in the code, the values seem to be very strange for the set3DFadeDistance function
bass:Set3DFadeDistance(self.radius, 1000000000)
The radius seems to be set to the wrong value? This would modify the minimum radius, not the maximum radius, surely?

@Vurv78
Copy link
Owner

Vurv78 commented Apr 30, 2021

Yes, doing the opposite (which would seem correct) yielded the same results as you are having for me. I heard the sound across the map

@ghost
Copy link
Author

ghost commented Apr 30, 2021

Looks like you're right; the values are reversed: if I set the minimum to 1 and maximum to 2000, the sound fades in after I get a (very) far distance away from the E2 chip.

@Vurv78
Copy link
Owner

Vurv78 commented Apr 30, 2021

Very weird so yeah we'll just manually set the volume like streamcore does. Either way we needed to do this in order to add #11

Vurv78 added a commit that referenced this issue May 1, 2021
Fixes #13, also made the maximum radius and volume settings much more relaxed at 3x volume and 10,000 source units distance radius. If you want it lower, just set your server or client's convars.
@Vurv78 Vurv78 closed this as completed in #14 May 1, 2021
Vurv78 added a commit that referenced this issue May 1, 2021
Volume is now manually set depending on the distance to the stream & the radius of the stream. It is no longer using Set3DFadeDistance.
Fixes #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant