int Mp3Loop(int sn);

 

Plays an MP3 file in an infinite loop, or until Mp3Stop() is called on the file.

 

Return Value

 

Returns zero if successful.

 

Parameters

 

sn

Handle to the MP3 file.  Only one MP3 file may be played at a time.  This is due to performance issues on the device.  Calling this function while another Mp3 file is playing causes playback to stop, and the new file to loop.

 

Remarks

 

Mp3Loop() plays a sound file represented by an integer handle returned by Mp3Add() infinitely, or until Mp3Stop() is called on the file.

 

Availability

 

Available in DragonFireSDK 1.1 and later.

 

Example

 

The example below loads a file called "Soundtrack.mp3" and calls Mp3Loop() to play back the file infinitely. Mp3Stop() is called in AppExit() to halt playback.

 

#include "DragonFireSDK.h"

 

int Mp3Handle;

 

void AppMain()

{

  Mp3Handle = Mp3Add("Soundtrack.mp3");

  Mp3Loop(Mp3Handle);

}

 

void AppExit()

{

  Mp3Stop(Mp3Handle);

}

 

void OnTimer()

{

 

}