AU_WAVE(3)

NAME
AU_Wave - agar audio waveform

SYNOPSIS

    #include <agar/au.h>

DESCRIPTION
The AU_Wave structure stores uncompressed, multi-channel audio data.

INTERFACE
AU_Wave * AU_WaveNew(void)

AU_Wave * AU_WaveFromFile(const char *path)

void AU_WaveFree(AU_Wave *wave)

void AU_WaveFreeData(AU_Wave *wave)

int AU_WaveLoad(AU_Wave *wave, const char *path)

int AU_WaveGenVisual(AU_Wave *wave, int reduce)

The AU_WaveNew() function returns a newly-allocated, empty AU_Wave structure. AU_WaveFromFile() returns a newly-allocated AU_Wave with contents loaded from the specified file. The file may be in any format recognized by libsndfile.

The AU_WaveFree() routine frees the AU_Wave and all of its associated resources. AU_WaveFreeData() frees the audio stream, reinitializing the AU_Wave structure to an empty stream.

The AU_WaveLoad() function loads an audio stream from the specified path. The file may be in any libsndfile-supported format.

The AU_WaveGenVisual() function generates a reduced waveform suitable for visualization purposes. The reduced waveform is stored in the AU_Wave structure itself, and is intended to be accessed by GUI visualization widgets.

SEE ALSO
AU(3)

HISTORY
The AU(3) library and the AU_Wave structure first appeared in Agar 1.5.0.