It is currently Wed Sep 08, 2010 6:13 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: SDL_mixer unable to load .mp3 file?
PostPosted: Tue Apr 06, 2010 5:03 pm 
User avatar
Joined: Tue Apr 06, 2010 4:54 pm
Posts: 25

Hi forum,

I recently found a sweet .mp3 music file for my game, but SDL_mixer is unable to load and play it...I've checked the docs for SDL_mixer and it states that: "It also supports OGG, MP3, MOD and MIDI" (this is for sound because the Mix_LoadMUS part is down atm, but I searched the net and found it to support the format as well). I double-checked my syntax and other common errors with no luck.

Then I found this: http://www.dengine.net/blog/?p=106

Can anyone confirm and should I consider switching to SDL_sound instead?

- NordCoder

_________________
- NordCoder


Offline
 Profile  
 Post subject: Re: SDL_mixer unable to load .mp3 file?
PostPosted: Thu Apr 08, 2010 8:48 am 
Joined: Thu Jun 18, 2009 11:47 pm
Posts: 33

Well, looking at the links you posted, seems that SDL_mixer is unable to read mp3 files with ID3v2 tags. Unless you are doing any audio player or something like, i guess the fastest solution would be rip off the tags of the file and test again.

Good luck.


Offline
 Profile  
 Post subject: Re: SDL_mixer unable to load .mp3 file?
PostPosted: Thu Apr 08, 2010 12:33 pm 
User avatar
Joined: Tue Apr 06, 2010 4:54 pm
Posts: 25

Yeah, prolly, though I have no idea how to rip stuff like that. I only posted this to confirm if this was true or not.

However, using media-convert.com I converted from .mp3 to .mp3 and the generated file did not contain the ID3v2 tag. Also converted to .ogg which worked like a charm.

Thanks for the reply :)

_________________
- NordCoder


Offline
 Profile  
 Post subject: Re: SDL_mixer unable to load .mp3 file?
PostPosted: Thu Apr 08, 2010 1:58 pm 
Joined: Thu Jun 18, 2009 11:47 pm
Posts: 33

Oh I'm glad you figured out. If you are using *nix there are a ton of tools you can use to strip tags, look for "id3" in your package manager.

Anyway, it seems that you confirmed that SDL_mixer cannot load id3v2 tags :)
Thanks for the info, it will be useful.


Offline
 Profile  
 Post subject: Re: SDL_mixer unable to load .mp3 file?
PostPosted: Fri Apr 09, 2010 11:05 am 
User avatar
Joined: Tue Apr 06, 2010 4:54 pm
Posts: 25

Dunno what *nix is, but I'll be sure to check it out :)

No problem ;) I'll email the creator(s) of SDL_mixer (whoever they are) about this so it can get changed in future versions.

_________________
- NordCoder


Offline
 Profile  
 Post subject: Re: SDL_mixer unable to load .mp3 file?
PostPosted: Fri Apr 09, 2010 4:00 pm 
Site Admin
Joined: Tue Oct 28, 2008 9:55 am
Posts: 185
Location: Indiana

*nix means a Linux distribution (like Ubuntu, Fedora, etc...). Regarding the creator, that would be mister Sam Langtinga himself, and 2 other guys. I doubt they have time, but you can surely let them know.

Regarding MP3s, you can also try out a different audio library like OpenAL (http://connect.creativelabs.com/openal/default.aspx) or FMOD (http://www.fmod.org/).

Here's something to ponder: Since you are using open-source code, I assume you are an open-source kind of person. If so, why are you using a closed source, license required, audio format like an mp3? I would use ogg.


Offline
 Profile  
 Post subject: Re: SDL_mixer unable to load .mp3 file?
PostPosted: Mon Apr 12, 2010 5:44 am 
User avatar
Joined: Tue Apr 06, 2010 4:54 pm
Posts: 25

I am definitely pro open-source, so I'll stick with .ogg (or similar open-source formats). I'll have to check the other libraries out and maybe redo my engine after the contest (going to do it with SDL+OpenGL anyway, so might as well), even though SDL_mixer covers my needs so far :) Thanks for the links and info!

_________________
- NordCoder


Offline
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


 Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: