SDL_Mixer & loading mp3 SDL_RWops

is it possible to load and play an mp3 currently if given a SDL_RWops
pointer? if not, would it be possible for me to look at adding this
functionality or is the way smpeg uses the data not compatable to do such?

–keith

Keith Swyer wrote:

is it possible to load and play an mp3 currently if given a SDL_RWops
pointer? if not, would it be possible for me to look at adding this
functionality or is the way smpeg uses the data not compatable to do such?

–keith


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

There is a nice library, SDL_Sound, which can load a variety of file formats,
including MP3 via SMPEG or MPG123, from rwops.

http://www.icculus.org/sdl_sound/

Corona688

Keith Swyer wrote:

is it possible to load and play an mp3 currently if given a SDL_RWops
pointer? if not, would it be possible for me to look at adding this
functionality or is the way smpeg uses the data not compatable
to do such?

–keith

There is a nice library, SDL_Sound, which can load a variety of
file formats,
including MP3 via SMPEG or MPG123, from rwops.

http://www.icculus.org/sdl_sound/

Actually, it’s http://www.icculus.org/SDL_sound/

The server’s case-sensitive.> From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of

Sent: Tuesday, July 09, 2002 4:21 PM
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Mixer & loading mp3 SDL_RWops


John Hattan Sweet software for a saturnine world
@John_Hattan http://www.thecodezone.com

Corona688

Keith Swyer wrote:

is it possible to load and play an mp3 currently if given a SDL_RWops
pointer? if not, would it be possible for me to look at adding this
functionality or is the way smpeg uses the data not compatable
to do such?

There is a nice library, SDL_Sound, which can load a variety of
file formats,
including MP3 via SMPEG or MPG123, from rwops.

http://www.icculus.org/sdl_sound/

Also, a dumb question. SDL_Sound looks plenty capable for decoding sound
samples from files or memory. What, though, do you do to play the sounds?

SDL_Mixer deals with its own Mix_Chunk structure for the sounds it plays, so
I assume you can’t just hand off a Sound_Sample to it.> From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of

Sent: Tuesday, July 09, 2002 4:21 PM
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Mixer & loading mp3 SDL_RWops


John Hattan Sweet software for a saturnine world
@John_Hattan http://www.thecodezone.com

well, i have been using SDL_sound originally, and loading from rwops works
fine. however, with sdl_mixer, i am able to loop the music easily…and
can’t figure it out through sdl sound…if anyone can help me there that’d
be great. but i also like that i can do sound effects easily with sdl mixer.
i’d rather try to stay away from using both, if that’s even possible, and
since right now i am more familar with sdl_sound, if anyone can help with
the looping i’ll stick with that.

o, and as far as playing the sounds with sdl sound, there is A LOT more
specific setup to actually play the sound, including writting your own
decode buffer callback.

–keith> ----- Original Message -----

From: john@thecodezone.com (John Hattan)
To:
Sent: Tuesday, July 09, 2002 7:33 PM
Subject: RE: [SDL] SDL_Mixer & loading mp3 SDL_RWops

From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Corona688
Sent: Tuesday, July 09, 2002 4:21 PM
To: sdl at libsdl.org
Subject: Re: [SDL] SDL_Mixer & loading mp3 SDL_RWops

Keith Swyer wrote:

is it possible to load and play an mp3 currently if given a SDL_RWops
pointer? if not, would it be possible for me to look at adding this
functionality or is the way smpeg uses the data not compatable
to do such?

There is a nice library, SDL_Sound, which can load a variety of
file formats,
including MP3 via SMPEG or MPG123, from rwops.

http://www.icculus.org/sdl_sound/

Also, a dumb question. SDL_Sound looks plenty capable for decoding sound
samples from files or memory. What, though, do you do to play the sounds?

SDL_Mixer deals with its own Mix_Chunk structure for the sounds it plays,
so
I assume you can’t just hand off a Sound_Sample to it.


John Hattan Sweet software for a saturnine world
john at thecodezone.com http://www.thecodezone.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

is it possible to load and play an mp3 currently if given a SDL_RWops
pointer? if not, would it be possible for me to look at adding this
functionality or is the way smpeg uses the data not compatable to do such?

It could be hooked up relatively easily, but the whole system is getting
scrapped for something more generic in the future anyhow.

–ryan.

SDL_Mixer deals with its own Mix_Chunk structure for the sounds it plays, so
I assume you can’t just hand off a Sound_Sample to it.

You will be able to in the next version of SDL_mixer.

In the meantime, you can use Sound_DecodeAll() to get a complete waveform
and then create a Mix_Chunk from it. This is not ideal, since something
like an MP3 can eat a lot of memory when fully decoded.

–ryan.