Beispiel #1
0
func CreateBufferWavefrom(
	waveshape al.ALenum,
	frequency float32,
	phase float32,
	duration float32,
) al.Buffer {
	return al.Buffer(C.alutCreateBufferWaveform(
		C.ALenum(waveshape),
		C.ALfloat(frequency),
		C.ALfloat(phase),
		C.ALfloat(duration),
	))
}
Beispiel #2
0
func CreateBufferHelloWorld() al.Buffer {
	return al.Buffer(C.alutCreateBufferHelloWorld())
}
Beispiel #3
0
func CreateBufferFromFile(fileName string) al.Buffer {
	s := C.CString(fileName)
	b := al.Buffer(C.alutCreateBufferFromFile(s))
	C.free(unsafe.Pointer(s))
	return b
}