libao - function - ao_open_live

libao documentation | libao version 1.2.2 - 20161114

# ao_open_live

declared in "ao/ao.h";

Open a live playback audio device for output.

    ao_device* ao_open_live(int driver_id, ao_sample_format *format, ao_option *options);

### Parameters

driver_id
  The ID number of the driver as returned by either ao_driver_id() or ao_default_driver_id().
format
  Pointer to a struct describing the sample format. The caller retains ownership of this structure.
options
  A linked list of options to be passed to the driver or NULL if no options are needed. Unsupported options are ignored.

### Return Values

> - non-NULL pointer inicates success. This pointer must be passed in subsequent calls to ao_play() and ao_close().
> - NULL indicates failure. `errno` will contain the specific cause of the failure:
> - AO_ENODRIVER - No driver corresponds to `driver_id`.
> - AO_ENOTLIVE - This driver is not a live output device.
> - AO_EBADOPTION - A valid option key has an invalid value.
> - AO_EOPENDEVICE - Cannot open the device (for example, if /dev/dsp cannot be opened for writing).
> - AO_EFAIL - Any other cause of failure.

### Notes

File output drivers cannot be used with this function. Use ao_open_file() instead.

copyright © 2001-2003 Stan Seibert, 2010-2016 Monty | xiph.org monty@xiph.org
libao documentation | libao version 1.2.2 - 20161114