Exemplo n.º 1
0
func CreateBufferFromFile(name string) (buffer *Buffer) {
	p := C.CString(name)
	h := C.alutCreateBufferFromFile(p)
	C.free(unsafe.Pointer(p))

	if AlutGetError() != AlutErrorNoError {
		return
	}

	buffer = new(Buffer)
	buffer.handle = h
	rememberBuffer(buffer)
	return
}
Exemplo n.º 2
0
Arquivo: alut.go Projeto: nzlov/goal
func CreateBufferFromFile(fileName string) al.Buffer {
	s := C.CString(fileName)
	b := al.Buffer(C.alutCreateBufferFromFile(s))
	C.free(unsafe.Pointer(s))
	return b
}