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 - [patch] Mix_OpenAudioDevice support
Summary: [patch] Mix_OpenAudioDevice support
Status: RESOLVED FIXED
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.1
Hardware: All All
: P2 enhancement
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-28 21:38 UTC by Francisco de la Peña
Modified: 2016-01-30 15:03 UTC (History)
0 users

See Also:


Attachments
Mix_OpenAudioDevice patch (2.93 KB, patch)
2015-10-28 21:38 UTC, Francisco de la Peña
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!