65.9K
CodeProject is changing. Read more.
Home

Little Audio Player

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.44/5 (15 votes)

Jan 4, 2005

viewsIcon

98116

downloadIcon

3731

This article demonstrates a very simple way to play MP3 files and with a very efficient programming engine from FMOD.

Sample Image

Introduction

The article I will present is nothing much really. I just tried to make a very good copy of Winamp. The SDK can easily be found on here with full support even for Linux OS-s and with all the documentation you need.

Using the code

The code is really very easy to use. The functions from the FMOD SDK look like this:

FSOUND_Sample_Load(
int index,
const char *name_or_data,
unsigned int inputmode,
int offset,
int length
);

or

FSOUND_PlaySound(
int channel,
FSOUND_SAMPLE *sptr
);

The SDK from FMOD is very useful. The thing I liked about it is that it loads and decodes a static sound file into memory. This includes such files as .WAV, .MP2, .MP3, .OGG, .RAW and others. There is no big deal to explain about the code because it is all in the documentation. I posted this article for the ones that need a very powerful and easy to use SDK for game developing.