This structure holds all of the data for an open device.
typedef struct {
int type; /* live output or file output? */
int driver_id;
ao_functions *funcs;
FILE *file; /* File for output if this is a file driver */
int client_byte_format;
int machine_byte_format;
int driver_byte_format;
char *swap_buffer;
int swap_buffer_size; /* Bytes allocated to swap_buffer */
void *internal; /* Pointer to driver-specific data */
} ao_device;
Relevant Struct Members
type
The output type of the driver:
AO_TYPE_LIVE - Live output.
AO_TYPE_FILE - File output.
driver_id
The ID number for the driver used with this device.
funcs
Function table for the driver associated with this device.
client_byte_format
The byte format (use constants from
ao_sample_format) of samples provided by
the client to ao_play().
machine_byte_format
The native byte format of the computer. Will be either
AO_FMT_BIG or AO_FMT_LITTLE.
driver_byte_format
The byte format of samples requested by
the driver.
swap_buffer
Scratch buffer used to swap the byte order of samples. Only allocated
if client_byte_format and driver_byte_format correspond to
different byte orders, otherwise set to NULL