We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3160

Summary: [patch] Mix_OpenAudioDevice support
Product: SDL_mixer Reporter: Francisco de la Peña <fran>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2    
Version: 2.0.1   
Hardware: All   
OS: All   
Attachments: Mix_OpenAudioDevice patch

Description Francisco de la Peña 2015-10-28 21:38:06 UTC
Created attachment 2292 [details]
Mix_OpenAudioDevice patch

This patch Adds a Mix_OpenAudioDevice function which allows to control device ID, frequency, channel and format changes.

We are using this patch to make timidity and libmodplug work in Emscripten, which uses a 32 bit float audio format and they are not using SDL_ConvertAudio, then allows to force conversion from AUDIO_S16SYS which is supported by them.

This patch is not working properly yet, e.g. it fails to reproduce some wav and ogg files (plays silence instead). Amendments are welcome.
Comment 1 Francisco de la Peña 2016-01-30 15:03:54 UTC
Implemented since https://hg.libsdl.org/SDL_mixer/rev/fb0562cc1559
Thanks, Juha!