PDA

View Full Version : Generic music player code?



CoderMan
03-18-2010, 07:40 PM
I'm writing a small game (my first) for Linux and have been using ClanLib 2.0.4. (I'm about to upgrade to 2.1) I wrote a tiny class for playing the game music in a CL_Runnable, but it is lame because it doesn't queue tracks, pause, restart, and so forth.

I was about to get into writing a full-fledged "jukebox" class. But since this is a pretty standard part of game programming, I was wondering if somebody had already open-sourced such a game component that I could use.

rombust
03-18-2010, 10:07 PM
Definitely upgrade to 2.1.1, clanSound has had a major revamp, and is much more stable and faster.

For sound, you are provided with lots of options, you can use one, or all of them:

1) clanSound - Play standard ".wav" files (Useful for in game sound effects)

2) clanVorbis - Play's ogg sound files (Useful for pre-recorded in game music). See - http://en.wikipedia.org/wiki/Vorbis

3) clanMikmod - Play's music modules. (File size is usually very small)
It uses libMikmod ( http://en.wikipedia.org/wiki/Mikmod#libmikmod ).
For my ClanLib game ( http://methane.sourceforge.net/ ) I use it to play .MOD files ( http://en.wikipedia.org/wiki/MOD_(file_format) ) .
The shadowofthebeast example uses clanMikmod