NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char PlayFileEx ( string  filename,
byte  volume,
bool  loop,
unsigned int  sr = 0 
)
inline

Play a file with extra options.

Play the specified file. The filename may be any valid string expression. Volume should be a number from 0 (silent) to 4 (loudest). Play the file repeatedly if loop is true. The sound file can either be an RSO file containing PCM or compressed ADPCM samples or it can be an NXT melody (RMD) file containing frequency and duration values.

Parameters
filenameThe name of the sound or melody file to play.
volumeThe desired tone volume.
loopA boolean flag indicating whether to play the file repeatedly.
srAn optional sample rate at which to play the sound file. A value of zero means to use the sample rate specified in the sound file header.
Examples:
ex_PlayFileEx.nxc.