Closed Starbuck5 closed 1 month ago
What about testing the available hardware/audio device channels as an advised safety wrapper?
e.g.
num_dev_channels = pygame.mixer.get_init()[2]
if (num_dev_channels != 8):
channel.set_source_location(90, 255)
Or we could handle this ourselves in the code for chan_set_source_location()
using Mix_QuerySpec()
and just skipping positional audio with 8 hardware channels until SDL resolves this?
What about testing the available hardware/audio device channels as an advised safety wrapper?
e.g.
num_dev_channels = pygame.mixer.get_init()[2] if (num_dev_channels != 8): channel.set_source_location(90, 255)
Or we could handle this ourselves in the code for
chan_set_source_location()
usingMix_QuerySpec()
and just skipping positional audio with 8 hardware channels until SDL resolves this?
That isn't a bad idea. I went with my current recommendation because it will (theoretically) keep the source position working. If someone has some crazy fancy setup that supports 7.1 audio, and SDL emulates stereo on top of it, and the source location is set, they should still be able to hear the sound coming from an angle.
I'm hesitant to ignore an exception (or never even try) based on Mix_QuerySpec, since SDL will eventually fix this and then we'll need to remove that code. Also it gives no feedback to the user on why the function isn't working.
For #2751