Пример #1
0
Файл: ao.go Проект: 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
}
Пример #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)))
}