Exemple #1
0
func LoadSample(filename string) *Sample {
	f := C.CString(filename)
	defer C.free(unsafe.Pointer(f))
	return (*Sample)(unsafe.Pointer(C.al_load_sample(f)))
}
Exemple #2
0
// Loads a C sample from a filename
func loadSample(filename string) *C.ALLEGRO_SAMPLE {
	cstr := cstr(filename)
	defer cstrFree(cstr)
	return C.al_load_sample(cstr)
}