Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find audio device by name. / Audio device IDs appear to be inconsistent. #312

Open
franzitrone opened this issue Feb 4, 2025 · 0 comments
Assignees
Milestone

Comments

@franzitrone
Copy link

franzitrone commented Feb 4, 2025

Hey there!

Since switching to sdl2-compat, the python pygame.mixer does not seem to find audio devices anymore when supplied the devicename parameter.

It appears that when pygame.mixer.init is first run, sdl2-compat's GetAudioDeviceLocked has an empty list for AudioSDL3PlaybackDevices.

For my use case, always rebuilding the list when calling GetAudioDeviceLocked restores previous behaviour. This is the patch that I currently use: 6c7bd3e. I have also tried only rebuilding the list when it is empty, but this results in a invalid ID being used to open the audio device.

This may be an issue with pygame itself, but since it has previously worked and stopped since sdl2-compat, I'm suspecting that some compatibility layer is incompatible with pygame. Unfortunately, I haven't had the capabilities to test sdl2-compat directly yet.

I'm still hoping that this helps in some way.

@icculus icculus self-assigned this Feb 4, 2025
@icculus icculus added this to the 2.30.54 milestone Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants