openTRI 0.1
Data Structures | Functions
WAV

Data Structures

struct  triWav
 A WAV file struct. More...
 

Functions

triBool triWavInit ()
 Initialise the WAV playback. More...
 
triWavtriWavLoad (const triChar *filename)
 Load a WAV file. More...
 
triVoid triWavFree (triWav *theWav)
 Unload a previously loaded WAV file.
 
triBool triWavPlay (triWav *theWav)
 Start playing a loaded WAV file. More...
 
triVoid triWavStop (triWav *theWav)
 Stop playing a loaded WAV.
 
triVoid triWavStopAll ()
 Stop playing all WAVs.
 
triVoid triWavSetLoop (triWav *theWav, triUInt loop)
 Set the loop of the WAV playback. More...
 

Detailed Description

Function Documentation

◆ triWavInit()

triBool triWavInit ( )

Initialise the WAV playback.

Returns
true on success.

◆ triWavLoad()

triWav * triWavLoad ( const triChar *  filename)

Load a WAV file.

Parameters
filename- Path of the file to load.
Returns
A pointer to a ::triWAV struct or NULL on error.

◆ triWavPlay()

triBool triWavPlay ( triWav theWav)

Start playing a loaded WAV file.

Parameters
theWavA pointer to a valid triWav struct.
Returns
< 0 on error, or 0 if no error.

◆ triWavSetLoop()

triVoid triWavSetLoop ( triWav theWav,
triUInt  loop 
)

Set the loop of the WAV playback.

Parameters
theWav- A pointer to a valid triWav struct.
loop- Set to 1 to loop, 0 to playback once.