LAGonauta / MetaAudio

GoldSrc engine plugin for 3D sound
GNU General Public License v2.0
98 stars 14 forks source link

Bug: The positioning of audio sources is off when using 24 bit audio #62

Open RavenMacDaddy opened 7 months ago

RavenMacDaddy commented 7 months ago

For reference, here's a YT video showcasing a full audio remaster, with download links in the description.

MetaAudio supports 16 bit depth, while Sven Co-op, which utilizes FMOD Ex for audio output, also supports 24 bit depth, hence the separate downloads with the corresponding quality and reference.

Using the 24 bit version with MetaAudio and HL25, the audio does play, but the distance to audio sources is completely off.

E.g., while riding the tram with the helicopter down below on the ground, it sounds like the helicopter is right next to you.

Is it possible to support 24 bit depth quality in the future, or is that outside the scope of the MetaAudio project?

LAGonauta commented 7 months ago

24-bit should be supported from the get go, but I see that there is probably a bug somewhere.

It used to work, so I must have broken it along the way.

I will take a look when I get the time 👍

LAGonauta commented 7 months ago

I see that the 24-bit sound files are stereo. If you convert them all to mono they should work. OpenAL doesn't spatializes stereo audio, SvenCoop/FMOD may downmix it to mono automatically and that is why it works there.

Is there any technical reason for them to be stereo?

RavenMacDaddy commented 7 months ago

Personally, I do not know - though the author of the mod and referenced video might.

On my end, I'll look into converting the audio to mono to test the theory.

RavenMacDaddy commented 7 months ago

So far, I've not found an easy and effective way to batch process all the files into mono (obviously, without risking sacrificing the quality whatsoever).

Sure, it seems to be available in large suites like FL Studio and the like, but all I want to do is right-click the corresponding folder, called sound in this case, keep the folder and file structure, and convert all the files from stereo to mono — that's it.

Alternatively, something comparable, like opening an app and pointing to that folder, and then entering the output dir.

Since this operation isn't that common, it doesn't seem to readily available — possibly with some command for tools like ffmpeg or similar, which I'm not personally familiar with, or ready to put time and effort into.

I'll try to get in touch with the mod creator to check the reason for the stereo files and if mono files would be possible to upload or something like that.

LAGonauta commented 7 months ago

I think this tool can do it

RavenMacDaddy commented 7 months ago

I think this tool can do it

Indeed — good find!

I think the biggest issue is that the actual sounds used in Sven Co-op versus Half-Life stock are seemingly very different — that's, which audio file is used when and where.

When making a direct convert as discussed above, the audio files that are literally the same play, though since most don't, I have a very hard time confirming if using mono files solved the issue.

I've made a comment on the video (partly because I'm not interested in social media like X) — let's see if the author's down to create a 24 bit set for Half-Life specifically.