SDL-mixer and SDL-sound: Problem with mp3 support
Vincent Prat
vinceprat at free.fr
Sun May 12 13:54:04 UTC 2013
Hello
Thank you for your answer.
After some investigations, it appears that libmad and sdl-mixer work
fine. It is in fact sdl-sound that is unable to handle correctly mp3 files.
I used sdl-sound to compute the duration of the sound file I wanted to
play and if the duration was zero, nothing was played by sdl-mixer.
Sorry for having misled you.
Anyway, there is still a problem with sdl-sound. The duration of mp3
files is largely underestimated whereas the result is correct for other
formats. And using sdl-sound to play a mp3 sound through
Mix_QuickLoad_RAW and Mix_PlayChannel gives a very short and unpleasant
sound.
Besides, for a valid mp3 file, the flag of the corresponding
Sound_Sample used to be different from SOUND_SAMPLEFLAG_NONE, which is
not the case now.
Cheers.
Vincent
Le 12/05/2013 14:14, Manuel A. Fernandez Montecelo a écrit :
> Hello
>
> 2013/5/10 Vincent Prat<vinceprat at free.fr>:
>> Hello
>>
>> Since the upgrade from squeeze to wheezy, I cannot play mp3 files with
>> sdl-mixer and sdl-sound anymore.
>> Other audio formats (wav, ogg) work well. Is there something special to do
>> to enable mp3 support or is it a bug?
>> By the way, the description of the libsdl-mixer1.2 package talks about SPMEG
>> but in fact it has been replaced by MAD.
>> Thank you in advance.
> You are right.
>
> You shouldn't need to do anything special to play mp3 files, no. Did
> you try to see if libmad indeed works in your system with the same mp3
> files, by playing them with a program depending on it? For example
> "mpg321", "cmus" or "audacity".
>
> You can also use the "playmus.c" provided as sample with sdl-mixer
> [1]. Compiling and launching with these commands should let you hear
> something:
>
> gcc playmus.c -lSDL -lSDL_mixer -I /usr/include/SDL/ -o playmus
> ./playmus some-file.mp3
>
> Let us know how it goes.
>
> [1] http://anonscm.debian.org/gitweb/?p=pkg-sdl/packages/sdl-mixer1.2.git;a=tree
>
> Cheers.
>
More information about the Pkg-sdl-maintainers
mailing list