Ejemplo n.º 1
0
Archivo: audio.go Proyecto: beoran/algo
// Opens an Allegro File
func openFile(filename, mode string) *C.ALLEGRO_FILE {
	cfilename := cstr(filename)
	defer cstrFree(cfilename)
	cmode := cstr(mode)
	defer cstrFree(cmode)
	return C.al_fopen(cfilename, cmode)
}
Ejemplo n.º 2
0
func Fopen(path, mode string) *File {
	p := C.CString(path)
	defer C.free(unsafe.Pointer(p))
	m := C.CString(mode)
	defer C.free(unsafe.Pointer(m))
	return (*File)(unsafe.Pointer(C.al_fopen(p, m)))
}