-
Notifications
You must be signed in to change notification settings - Fork 255
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
In-game Radio chat sounds cut off #180
Comments
Happens on M-series mac as well.
|
Hello! I face a potentially similar issue where the SFX for completing objectives and robot noises are "laggy". I have used the build artifact from https://github.com/DescentDevelopers/Descent3/actions/runs/8836170706 Here is the issue in action: https://drive.google.com/file/d/17ofkyK12CWtHAWf724wmiBCAzLxFB838/view?usp=sharing (GitHub wont let me attach videos or files above 10MB therefore the GDrive link) |
I spent a lot of time debugging this, and so far the conclusion I can tell is that old libacm thinks the sound is a single channel, while the new libacm seems to think it is two channels, which ends up halving the amount of samples that end up being played. I'm not sure why they diverge yet, trying to dig deeper. There's even a comment in adecode.cpp about it
whoever wrote that, looks like it's going to have to be addressed |
I wrote that. In libacm/decode.,c try to comment out 814 and 815 ( If that indeed fixes the issue, it probably makes sense to send a patch to upstream libacm. if (force_chans > 0)
acm->info.channels = force_chans;
#ifndef ACM_TRUST_HEADER_CHANNELS
else if (!acm->wavc_file && acm->info.channels < 2)
acm->info.channels = 2;
#endif UPDATE: possibly nicer solution: give if (force_chans > 0)
acm->info.channels = force_chans;
else if (force_chans != -1 && !acm->wavc_file && acm->info.channels < 2)
acm->info.channels = 2; and then just set |
If necessary, I am ready to test any changes to check if the issue is fixed or not 😄 |
This change fixes the problem for me.
That does seem to be the case. See: markokr/libacm@31e3bc9 and markokr/libacm@28c8b45
I like this. However, do we have any stereo files? If not we could set |
Indeed, this works for me as well.
to catch any cases with bogus channel values in the header (should not occur).
The main menu background music is a "interplayacm 2ch 22050Hz" file, but all the speech files seem to be mono. |
Futureproofing is preferred I'd think. Prior descent ports have higher quality sound mods. |
i poked around in the ffmpeg code and they give up if channels <= 0: FFmpeg/FFmpeg@5540d6c i suppose there could be other code upstream of that to validate the header but i'm not sure it matters for our purposes since we seem to be able to trust the header. |
<= 0, yes, but the case that libacm handles is mostly treating == 1 as stereo, I think I'll try to get a patch into libacm to support -1 for "really do what the header says" |
Note that mono vs stereo is not primarily a quality issue. Only sounds that are non-positional should be stereo, i.e. ones that are played at the players position no matter of their orientation. This is mostly music and movies, maybe sound effects of your own weapons and such. But normal ingame sound-effects must be mono, because they have a single sound source (an enemy, the position where a rocket explodes, etc) that will be mixed into the stereo (or even surround) audio stream according to its position. |
The PR is here: markokr/libacm#3 |
For the sake of completeness, my PR has been merged into libacm, now libacm/ in this repo has already been updated with the latest upstream libacm code. |
Build Version
47ff6e5
Operating System Environment
CPU Environment
Game Modes Affected
Game Environment
Arch Linux x86_64
X11, NVidia driver 550.76
Descent3 compiled from source as 32-bit or 64-bit
gcc version 13.2.1 20230801 (GCC)
Game files from european (german) retail release, Windows version, patched to v1.4
Description
In-game radio speech messages (at the beginning of missions) is cut off after a few seconds.
Regression Status
This bug was introduced when new libacm code was imported. Reverting to old code (commit f6f3c33 and libacm related follow-up commits) restore correct sound output.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: