func (device *Device) Play16(samples []int16) bool { raw := (*C.char)(unsafe.Pointer(&samples[0])) num := C.uint_32(len(samples) * 2) return C.ao_play(device.ao, raw, num) != 0 }
// FIXME: handle errors func (p *Player) Play(buf []byte) { C.ao_play(p.handle, (*C.char)(unsafe.Pointer(&buf[0])), C.uint_32(len(buf))) }