示例#1
0
func LoadStream(filename string, bufferCount uint64, samples uint32) *Stream {
	f := C.CString(filename)
	defer C.free(unsafe.Pointer(f))
	return (*Stream)(unsafe.Pointer(C.al_load_audio_stream(f, C.size_t(bufferCount), C.uint(samples))))
}
示例#2
0
文件: audio.go 项目: beoran/algo
// Loads a C audio stream sample from a filename
func loadAudioStream(filename string, buffer_count, samples uint) *C.ALLEGRO_AUDIO_STREAM {
	cstr := cstr(filename)
	defer cstrFree(cstr)
	return C.al_load_audio_stream(cstr, C.size_t(buffer_count), C.uint(samples))
}