Example #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))))
}
Example #2
0
File: audio.go Project: 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))
}