OldUnreal / UnrealTournamentPatches

Other
941 stars 27 forks source link

[469d-RC2] Engine doesn't play UMX music in 5.1 surround sound #1388

Open nickbailuc opened 10 months ago

nickbailuc commented 10 months ago

I've got a 5.1 surround setup, and the OS correctly sees it as 6 native independent channels (no virtual surround stuff). The in-game engine sounds work perfectly in surround sound, playing out of whichever speaker is most appropriate based on position, however the music in comparison sounds very flat as it only plays out of the first 2 channels (stereo). The odd thing is if I play the same UMX music files in VLC, it'll play different things out of all channels (and VLC reports these music files as being 16 channel).

I'm running 469d-rc2 on arm64 on Debian 12 with PipeWire, but I'm sure the engine would produce a similar result at least on any Linux machine.

Also a small oddity, enabling "surround sound" in the GUI menu doesn't seem to do anything. After restarting the game, the checkbox clears and does not modify anything in UnrealTournament.ini. Setting "UseSurround=True" under [ALAudio.ALAudioSubsystem] doesn't seem to do anything either (although i stole that from [Galaxy.GalaxyAudioSubsystem]. I'm guessing that checkbox only exists for Galaxy audio in Windows, and does not affect OpenAL at all, since the engine in Linux seems to output surround audio by default.

SeriousBuggie commented 10 months ago

You need specify which audio renders you test. There exists 2 renders: OpenAL, Cluster and Galaxy.

Not sure if UMX music originally support more then 2 channels. VLC can do some own mixing to more channels.

What about OpenMPT? Did it play in 2 channels only too?

nickbailuc commented 10 months ago

You need specify which audio renders you test. There exists 2 renders: OpenAL, Cluster and Galaxy.

Not sure if UMX music originally support more then 2 channels. VLC can do some own mixing to more channels.

What about OpenMPT? Did it play in 2 channels only too?

I'm using OpenAL, not even sure if Cluster/Galaxy are available or practical in the native Linux build.

VLC sees the umx files as having 16 channels of audio, but instead of mixing them down to stereo like normal, it plays multichannel when it sees the 5.1 setup. When it plays, it feels very proper and deliberate rather than VLC playing random 'tracks' in different speakers based on their enumeration.

Never heard of OpenMPT, looked it up it should theoretically be compile-able for linux-arm64 but probably unnecessary for this case.

UMX is kind of a looslely defined container for mpeg audio from what I understand, perhaps it is possible that different programs mix and render it in their own way. In that case I guess I should be asking how to make ut99 render the audio in a similar way, using all available speakers (it just sounds out of place when in-game audio uses all speakers but music only front left/right). Alternatively, maybe there's a way to make ut99 call a VLC script to specify songs to play and loop (which would be a little ironic given its a umx file)

If there's nothing further that I can try, I'll delete this thread, just gonna wait for anyone to comment with any advise

SeriousBuggie commented 10 months ago

UMX is just container. Inside can be .mod, .it, .s3m, .ogg.

dov910 commented 9 months ago

OpenMPT can play upto 4 channels but we need to configure first.