libao documentation | libao version 1.1.0 - 20110221

# ao_play

declared in "ao/ao.h";

Play a block of audio data to an open device. Samples are interleaved by channels (Time 1, Channel 1; Time 1, Channel 2; Time 2, Channel 1; etc.) in the memory buffer.

    int ao_play(ao_device *device, void *output_samples, uint_32 num_bytes);

### Parameters

device
  Pointer to device structure as returned by ao_open_live() or ao_open_file()
output_samples
  Memory buffer containing audio data.
num_bytes
  Number of bytes of audio data in the memory buffer.

### Return Values

> - non-zero value indicates success.
> - 0 indicates failure. The device should be closed.

copyright © 2001-2003 Stan Seibert, 2010-2011 Monty | xiph.org monty@xiph.org
libao documentation | libao version 1.1.0 - 20110221