Beispiel #1
0
Datei: ao.go Projekt: k19k/go-ao
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
}
Beispiel #2
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)))
}