Agar Logo

Agar 1.7 Manual

(Printable Version)
AU_DevOut(3)

SYNOPSIS

#include <agar/au.h>

DESCRIPTION

The AU_DevOut interface provides basic audio output functionality, using different drivers to interface with different audio systems.

INTERFACE


AU_DevOut * AU_OpenOut (const char *path, int rate, int channels)

void AU_CloseOut (AU_DevOut *dev)

int AU_AddChannel (AU_DevOut *dev)

int AU_DelChannel (AU_DevOut *dev, int channel)

void AU_WriteFloat (AU_DevOut *dev, float *data, Uint nFrames)


The AU_OpenOut() function opens the specified output device. The path argument should contain the name of the output driver, with optional arguments in round brackets. For example, pa opens the PortAudio output driver, if available. The file(foo.wav) argument specifies the "file" driver with an output filename argument. The rate argument is the requested sampling rate in Hz, and channels is the requested number of channels (if the device is unable to handle those settings, the call will fail). On success, a device handle is returned.

AU_CloseOut() closes the specified output device.

Every output device has an associated set of virtual channels, which is independent from the number of channels supported by the underlying device (software mixing is done if necessary). The AU_AddChannel() function adds a new virtual channel to the given output device. AU_DelChannel() deletes the specified channel.

The AU_WriteFloat() routine writes nFrames frames to the output device. A single frame should contain one float per channel.

SEE ALSO


HISTORY

The AU(3) library and the AU_DevOut interface first appeared in Agar 1.5.0.

Csoft.net ElectronTubeStore