示例#1
0
func (s *Sample) Save(filename string) bool {
	f := C.CString(filename)
	defer C.free(unsafe.Pointer(f))
	return bool(C.al_save_sample(f, (*C.ALLEGRO_SAMPLE)(unsafe.Pointer(s))))
}
示例#2
0
文件: audio.go 项目: beoran/algo
// Saves a sample to a given filename
func (self *Sample) Save(filename string) bool {
	cstr := cstr(filename)
	defer cstrFree(cstr)
	return cb2b(C.al_save_sample(cstr, self.handle))
}