libao - function - ao_plugin_open

libao documentation | libao version 0.8.0 - 20010804

# ao_plugin_open

declared in "ao/plugin.h";

Open the device for playback. All of the device options will have already been set by previous calls to ao_plugin_set_option(). If this is a file output driver, the file itself will have be already opened and a pointer to a `FILE` structure stored in `device->file`.

    int ao_plugin_open(ao_device *device, ao_sample_format *format);

### Parameters

device
  Pointer to pre-allocated device structure. The plugin should set its desired byte format in `device->driver_byte_format`.
format
  Output device sample format. `format->byte_format` should be ignored as it is relevant only to the library core.

### Return Values

> - 1 indicates success.
> - 0 indicates failure to open the device. ao_plugin_device_clear() should be called to ensure the deallocate of all private data structures.

copyright © 2001 Stan Seibert | xiph.org indigo@aztec.asu.edu
libao documentation | libao version 0.8.0 - 20010804