Exemple #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),
	))
}
Exemple #2
0
func CreateBufferHelloWorld() al.Buffer {
	return al.Buffer(C.alutCreateBufferHelloWorld())
}
Exemple #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
}