5

I have a game that, up until now, uses SDL_mixer for playing MP3 sound effects. Works on Linux, Windows, OSX. At the moment doesn't work on 64 bit Linux, so I was thinking of switching to FMOD.

Anyway, it would be nice if the game also worked on the PI, for when I get one. Is there a C library for mp3 playing that works on the PI? Does SDL_mixer work? I took a look at mpg123, but on Windows its just an exe and I need a cross platform lib. FMOD is not available for the PI.

ScrollerBlaster
  • 489
  • 1
  • 5
  • 12

1 Answers1

4

I can confirm that SDL_mixer works on the pi. I am working on a platform game and use SDL for graphics and sound. My sounds are in the ogg format, but SDL_mixer promises mp3 support as well. I have raspbian, every SDL package I needed I could install from the repositories. Btw, the same game runs well and with sound on 64 bit linux too (at least Ubuntu and Debian).

Incidentally, to get SDL graphics working in the console, have a look here for initializing it. Main point: first determine the screen dimensions with SDL_GetVideoInfo(), then initialize with those values.

Frepa
  • 2,261
  • 19
  • 17