MP3 Library


Data Structures

struct  pgeMp3Info

Functions

int pgeMp3Play (const char *filename)
int pgeMp3PlayMemory (unsigned char *data, unsigned int size)
void pgeMp3Stop (void)
void pgeMp3Pause (void)
void pgeMp3Loop (int loop)
int pgeMp3Volume (int volume)
short * pgeMp3GetAudioData (void)
int pgeMp3IsPlaying (void)
pgeMp3Info pgeMp3GetInfo (void)

Function Documentation

short* pgeMp3GetAudioData ( void   ) 

Get the current output data of the MP3

Returns:
A pointer to the current values in the output buffer.

pgeMp3Info pgeMp3GetInfo ( void   ) 

Get info about the playing MP3 (via ID3 tags)

Returns:
A filled pgeMp3Info struct

int pgeMp3IsPlaying ( void   ) 

Check if a MP3 is playing

Returns:
1 if an MP3 is playing, 0 if not.

void pgeMp3Loop ( int  loop  ) 

Set the loop status of the MP3 playback

Parameters:
loop - Set to 1 to loop, 0 to playback once

void pgeMp3Pause ( void   ) 

Pause a playing MP3 file

First call to this function will pause, second call will resume.

int pgeMp3Play ( const char *  filename  ) 

Play an MP3 file

Parameters:
filename - Path of the file to play.
Returns:
1 on success, 0 on error.

int pgeMp3PlayMemory ( unsigned char *  data,
unsigned int  size 
)

Play an MP3 file (from memory)

Parameters:
data - Pointer to the start of the MP3 data.
size - Size of the data in bytes.
Returns:
1 on success, 0 on error.

void pgeMp3Stop ( void   ) 

Stop playing a loaded MP3 file

int pgeMp3Volume ( int  volume  ) 

Set the volume of the MP3 playback

Parameters:
volume - The new volume. Accepted values 0 to 100000.
Returns:
The volume set, between 0 to 100000.


Generated on Mon Sep 22 16:58:14 2008 for Phoenix Game Engine by  doxygen 1.5.5