예제 #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))
}