Main Page   Data Structures   File List   Data Fields   Globals  

daisylibao.c File Reference

#include <ao/ao.h>
#include <stdio.h>
#include <stdbool.h>
#include <errno.h>
#include <assert.h>
#include "daisylibao.h"
#include "common.h"
#include "audio.h"
#include "report.h"
#include "snprintf/snprintf.h"

Go to the source code of this file.


void ao_open_live_error (void)
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

void ao_open_live_error void    [static]

This function is called if ao_open_live returns NULL. This means we have an error, and this method reports it based on errno

Definition at line 62 of file daisylibao.c.

References REP_ERROR, and report().

Referenced by libao_initiate().

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.

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.
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).

ao_device  *device - output device to play to.
void  *output_samples - number of samples to play.
int  num_bytes - number of bytes to play.
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]

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