libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.
zlib License
379 stars 133 forks source link

No support for 7.1 positioning #573

Open francisdb opened 8 months ago

francisdb commented 8 months ago

Looks like all the position functions fail with Unsupported audio channels if the number of channels not in [1,2,4,6]. 7.1 surround = 8 channels.

https://github.com/libsdl-org/SDL_mixer/blob/2bf94b9a29abe0b6146cfa606b078d044683577f/src/effect_position.c#L1344-L1359


My use case is a pinball emulator where we currently work with BASS and want to switch to SDL2/3_mixer

Internally that emulates a 2 + 4 setup where the pinball backglass has 2 speakers and the playfield has 4 exciters that reproduce ball / flipper / bumper sounds. The whole system is set up with a single 7.1 sound card where center/lfo channels are not used, Front channels are the backglass and Surround / Back channels the table. Audio positioning code is there but we need to be able to use 7.1.

icculus commented 8 months ago

I'll take a run at this soon!

bigwhoopgames commented 8 months ago

Would love for this to support 8 channels as well.

Starbuck5 commented 4 months ago

Hello, I've seen several reports of this through pygame-ce.

This manifests when people send out their games using positional audio out into the world. On some systems, 7.1 audio comes up as the default audio format, so this manifests as hardware specific crashes for games.