Sound-playing things warped to player have jumpy audio
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49238
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Sound-playing things warped to player have jumpy audio
I decided to close this because with an attenuation of 20 this is not fixable with ACS using another numeric system than the rest of the engine.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49238
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Sound-playing things warped to player have jumpy audio
Ah, that's why all my attempts to solve this at the higher level had so bad results...
Re: Sound-playing things warped to player have jumpy audio
Thank you Randi!
I noticed that the change is only in fmodsound.cpp. Would this change propagate to OpenAL as well or do I have to fix that separately?
I noticed that the change is only in fmodsound.cpp. Would this change propagate to OpenAL as well or do I have to fix that separately?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49238
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Sound-playing things warped to player have jumpy audio
The OpenAL backend has no concept of a 'head relative' sound, so it may behave differently. Have you tested there, too?
Re: Sound-playing things warped to player have jumpy audio
With a homebrew build of ZDoom (generated with FMod disabled in CMake) and running the audio in OpenAL mode, the example file still exhibits the broken behavior. Checkout is the latest (with the fixes Randi just commited). So it looks like in OpenAL, this bug still happens...
No problems with FMod, the bug has been fixed for that path.
No problems with FMod, the bug has been fixed for that path.
- Chris
- Posts: 2978
- Joined: Thu Jul 17, 2003 12:07 am
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: Sound-playing things warped to player have jumpy audio
Would it instead be possible to have an explicit HeadRelative flag for such sounds, rather than just guessing if it's "close enough"? There was a similar issue previously where even though the sound and listener positions were set the same, because the values were so large some of internal transforms applied to the sound position was creating floating point rounding errors on some systems/compilers, which were larger than the approximately-zero allowance of 1.19209290e-07 (this was fixed on OpenAL Soft's side by changing to doubles instead of floats for certain calculations, thereby reducing the rounding error, but having a clear indication of which sounds should be head-relative would be a better fix).
I can otherwise make a similar fix for the OpenAL backend as was applied to the FMOD backend, though it feels kludgy.
I can otherwise make a similar fix for the OpenAL backend as was applied to the FMOD backend, though it feels kludgy.