Пример #1
0
func CreateStream(fragmentCount uint64, fragSample, freq, depth, chanConf uint32) *Stream {
	return (*Stream)(unsafe.Pointer(C.al_create_audio_stream(C.size_t(fragmentCount), C.uint(fragSample), C.uint(freq), C.ALLEGRO_AUDIO_DEPTH(depth), C.ALLEGRO_CHANNEL_CONF(chanConf))))
}
Пример #2
0
func CreateRecorder(fragmentCount uint64, samples, frequency, depth, chanConf uint32) *Recorder {
	return (*Recorder)(unsafe.Pointer(C.al_create_audio_recorder(C.size_t(fragmentCount), C.uint(samples), C.uint(frequency), C.ALLEGRO_AUDIO_DEPTH(depth), C.ALLEGRO_CHANNEL_CONF(chanConf))))
}
Пример #3
0
func CreateMixer(freq, depth, chanConf uint32) *Mixer {
	return (*Mixer)(unsafe.Pointer(C.al_create_mixer(C.uint(freq), C.ALLEGRO_AUDIO_DEPTH(depth), C.ALLEGRO_CHANNEL_CONF(chanConf))))
}
Пример #4
0
func CreateSample(buf unsafe.Pointer, samples, freq, depth, chanConf uint32, freeBuf bool) *Sample {
	return (*Sample)(unsafe.Pointer(C.al_create_sample(buf, C.uint(samples), C.uint(freq), C.ALLEGRO_AUDIO_DEPTH(depth), C.ALLEGRO_CHANNEL_CONF(chanConf), C.bool(freeBuf))))
}
Пример #5
0
func CreateVoice(freq, depth, chanConf uint32) *Voice {
	return (*Voice)(unsafe.Pointer(C.al_create_voice(C.uint(freq), C.ALLEGRO_AUDIO_DEPTH(depth), C.ALLEGRO_CHANNEL_CONF(chanConf))))
}
Пример #6
0
func GetDepthSize(depth uint32) uint32 {
	return uint32(C.al_get_audio_depth_size(C.ALLEGRO_AUDIO_DEPTH(depth)))
}
Пример #7
0
// Converts an AudioDepth to an ALLEGRO_AUDIO_DEPTH
func (self AudioDepth) toC() C.ALLEGRO_AUDIO_DEPTH {
	return C.ALLEGRO_AUDIO_DEPTH(self)
}