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 }
func CreateBufferFromFile(fileName string) al.Buffer { s := C.CString(fileName) b := al.Buffer(C.alutCreateBufferFromFile(s)) C.free(unsafe.Pointer(s)) return b }