libsdl-org / SDL_mixer

An audio mixer that supports various file formats for Simple Directmedia Layer.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No support for 7.1 positioning

francisdb opened this issue · comments

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.

switch (channels) {
case 1:
case 2:
f = (_Eff_build_volume_table_u8()) ? _Eff_position_table_u8 :
_Eff_position_u8;
break;
case 4:
f = _Eff_position_u8_c4;
break;
case 6:
f = _Eff_position_u8_c6;
break;
default:
Mix_SetError("Unsupported audio channels");
break;
}


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.

I'll take a run at this soon!

Would love for this to support 8 channels as well.

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.