Main Page   Data Structures   File List   Data Fields   Globals  

daisylibao.h File Reference

#include <mad.h>
#include <stdbool.h>
#include "audio.h"
#include "common.h"

Go to the source code of this file.

Functions

ao_device * libao_initiate (int byte_format, int channels, int samplerate)
int libao_play (ao_device *device, void *output_samples, int num_bytes)
void libao_terminate (ao_device *device)


Function Documentation

ao_device* libao_initiate int    byte_format,
int    channels,
int    samplerate
 

Initialises the libao-part of the audio engine. Must be called before the libao part of the audio engine is to be used.

Parameters:
int  byte_format - the byte format of the audio samples to play.
int  channels - channels of the audio to be played.
int  samplerate - samplerate of the audio to be played.
Returns:
ao_device * - returns a pointer to the aodevice that should be used in playback.

Definition at line 101 of file daisylibao.c.

References ao_open_live_error(), REP_DEBUG, REP_ERROR, report(), and STRLEN.

Referenced by output().

int libao_play ao_device *    device,
void *    output_samples,
int    num_bytes
 

Outputs samples from a buffer. (basically wraps the ao_play() function).

Parameters:
ao_device  *device - output device to play to.
void  *output_samples - number of samples to play.
int  num_bytes - number of bytes to play.
Returns:
int - returns 0 on success, anything else on fail.

Definition at line 143 of file daisylibao.c.

Referenced by output().

void libao_terminate ao_device *    device
 

Terminates libao part of audio engine the Proper Way [tm]

Parameters:
ao_device  *device - the aodevice to terminate.

Definition at line 152 of file daisylibao.c.

References REP_DEBUG, and report().

Referenced by mp3_close(), and output().


Generated on Tue Sep 5 12:14:08 2006 for libdaisy by doxygen1.2.15