Search code examples
c++audiosdlsdl-mixer

Why would SDL_Mixer not play music for certain mp3s?


Why would SDL_Mixer not play music for certain mp3s?

I am utilizing SDL_Mixer for music playback in an application I am creating. On certain songs (entire albums actually), the music will simply not play without returning any errors. The music data loads successfully using Mix_LoadMUS and when executing Mix_PlayMusic with that data, it oddly enough returns 0 for success but plays no music. I have also tried reading Mix_GetError() and SDL_GetError() (I believe they're the same) to see if it raises an error, but no such luck.

My question is, what other reasons would SDL_mixer not be able to play a particular mp3?

I know the mp3's are functional since I can play them in other music players. I also know for a fact that they are not playing (as opposed to perhaps the volume being turned down) since Mix_PlayingMusic returns 0.

Thanks everyone!


Solution

  • This actually wound up being a sound issue with that particular computer. Upon trying the same tests on another machine, the sound worked flawlessly. Just a quick note in case someone else encounters this issue.