Exemplo n.º 1
0
Arquivo: alc.go Projeto: nzlov/goal
func (device *Device) CaptureSamples(buffer interface{}, samples int) {
	C.alcCaptureSamples((*C.ALCdevice)(device), ptr(buffer), C.ALCsizei(samples))
}
Exemplo n.º 2
0
func (self *CaptureDevice) CaptureTo(data []byte) {
	C.alcCaptureSamples(self.handle, unsafe.Pointer(&data[0]), C.ALCsizei(uint32(len(data))/self.sampleSize))
}
Exemplo n.º 3
0
func (self *CaptureDevice) CaptureStereo16To(data [][2]int16) {
	C.alcCaptureSamples(self.handle, unsafe.Pointer(&data[0]), C.ALCsizei(uint32(len(data))*4/self.sampleSize))
}
Exemplo n.º 4
0
func (self *CaptureDevice) CaptureSamples(size uint32) (data []byte) {
	data = make([]byte, size*self.sampleSize)
	C.alcCaptureSamples(self.handle, unsafe.Pointer(&data[0]), C.ALCsizei(size))
	return
}