Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 3833 - Silent MP3 playback using included smpeg2 library
Holger Schemel Summary: When playing MP3 files using the included smpeg2 library, audio output is silent. How to reproduce the problem: Build latest SDL2_mixer and smpeg2 (from directory "external/smpeg2-2.0.0") and play MP3 file using included music player "playmus". (Tested on Ubuntu 12.04 and Mac OS X 10.11.) Expected behaviour: "playmus" plays MP3 music through the computer's audio device. Observed behaviour: "playmus" appears to be playing, but the computer's audio device remains silent. The problem was introduced with changeset 718:fb0562cc1559, which replaces legacy functions like SDL_OpenAudio(), SDL_LockAudio(), SDL_PauseAudio(), SDL_MixAudio() etc. with their non-legacy counterparts like SDL_OpenAudioDevice(), SDL_LockAudioDevice(), SDL_PauseAudioDevice() and SDL_MixAudioFormat() in the SDL2_mixer code, while the smpeg2 code still uses the legacy functions. Replacing SDL_MixAudio() with SDL_MixAudioFormat() in the smpeg2 code fixes the problem, and MP3 playback using SDL2_mixer with smpeg2 works fine again (from both "playmus" and from my SDL2/SDL2_mixer/smpeg2 based games). The attached patch fixes the problem.
- Loading branch information
Showing
3 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters