예제 #1
0
파일: buffer.go 프로젝트: 9uuso/go-openal
// Renamed, was GetBuffer3i.
func (self Buffer) get3i(param int32) (value1, value2, value3 int32) {
	var v1, v2, v3 int32
	C.walGetBuffer3i(C.ALuint(self), C.ALenum(param), unsafe.Pointer(&v1),
		unsafe.Pointer(&v2), unsafe.Pointer(&v3))
	value1, value2, value3 = v1, v2, v3
	return
}
예제 #2
0
파일: source.go 프로젝트: 9uuso/go-openal
// Renamed, was GetSource3f.
func (self Source) get3f(param int32) (value1, value2, value3 float32) {
	var v1, v2, v3 float32
	C.walGetSource3f(C.ALuint(self), C.ALenum(param), unsafe.Pointer(&v1),
		unsafe.Pointer(&v2), unsafe.Pointer(&v3))
	value1, value2, value3 = v1, v2, v3
	return
}
예제 #3
0
파일: listener.go 프로젝트: 9uuso/go-openal
// Renamed, was GetListener3f.
func (self Listener) get3f(param int32) (value1, value2, value3 float32) {
	var v1, v2, v3 float32
	C.walGetListener3f(C.ALenum(param), unsafe.Pointer(&v1),
		unsafe.Pointer(&v2), unsafe.Pointer(&v3))
	value1, value2, value3 = v1, v2, v3
	return
}
예제 #4
0
파일: buffer.go 프로젝트: nzlov/goal
func (buffer Buffer) GetBuffer3i(param ALenum) (value1, value2, value3 int32) {
	C.alGetBuffer3i(
		C.ALuint(buffer), C.ALenum(param),
		(*C.ALint)(&value1),
		(*C.ALint)(&value2),
		(*C.ALint)(&value3),
	)
	return
}
예제 #5
0
파일: listener.go 프로젝트: nzlov/goal
func GetListener3i(param ALenum) (value1, value2, value3 int32) {
	C.alGetListener3i(
		C.ALenum(param),
		(*C.ALint)(&value1),
		(*C.ALint)(&value2),
		(*C.ALint)(&value3),
	)
	return
}
예제 #6
0
파일: listener.go 프로젝트: nzlov/goal
func GetListener3f(param ALenum) (value1, value2, value3 float32) {
	C.alGetListener3f(
		C.ALenum(param),
		(*C.ALfloat)(&value1),
		(*C.ALfloat)(&value2),
		(*C.ALfloat)(&value3),
	)
	return
}
예제 #7
0
파일: source.go 프로젝트: nzlov/goal
func (source Source) GetSource3i(param ALenum) (value1, value2, value3 int32) {
	C.alGetSource3i(
		C.ALuint(source), C.ALenum(param),
		(*C.ALint)(&value1),
		(*C.ALint)(&value2),
		(*C.ALint)(&value3),
	)
	return
}
예제 #8
0
파일: buffer.go 프로젝트: nzlov/goal
func (buffer Buffer) GetBuffer3f(param ALenum) (value1, value2, value3 float32) {
	C.alGetBuffer3f(
		C.ALuint(buffer), C.ALenum(param),
		(*C.ALfloat)(&value1),
		(*C.ALfloat)(&value2),
		(*C.ALfloat)(&value3),
	)
	return
}
예제 #9
0
파일: alut.go 프로젝트: nzlov/goal
func LoadMemoryWaveform(waveshape al.ALenum, frequency float32, phase float32, duration float32) (
	format al.ALenum, size int32, freq float32, data unsafe.Pointer) {
	data = C.alutLoadMemoryWaveform(
		C.ALenum(waveshape), C.ALfloat(frequency), C.ALfloat(phase), C.ALfloat(duration),
		(*C.ALenum)(&format),
		(*C.ALsizei)(&size),
		(*C.ALfloat)(&frequency),
	)
	return
}
예제 #10
0
파일: al_android.go 프로젝트: tanema/amore
func alGetBooleanv(k int, v []bool) {
	val := make([]C.ALboolean, len(v))
	for i, bv := range v {
		if bv {
			val[i] = C.AL_TRUE
		} else {
			val[i] = C.AL_FALSE
		}
	}
	C.call_alGetBooleanv(alGetBooleanvFunc, C.ALenum(k), &val[0])
}
예제 #11
0
파일: alut.go 프로젝트: nzlov/goal
func CreateBufferWavefrom(
	waveshape al.ALenum,
	frequency float32,
	phase float32,
	duration float32,
) al.Buffer {
	return al.Buffer(C.alutCreateBufferWaveform(
		C.ALenum(waveshape),
		C.ALfloat(frequency),
		C.ALfloat(phase),
		C.ALfloat(duration),
	))
}
예제 #12
0
파일: audio.go 프로젝트: anthonyrego/gosmf
func (s *Sound) LoadPCMData() {
	format := 0

	if s.Channels > 1 {
		switch s.BitsPerSample {
		case 8:
			format = C.AL_FORMAT_STEREO8
		case 16:
			format = C.AL_FORMAT_STEREO16
		}
	} else {
		switch s.BitsPerSample {
		case 8:
			format = C.AL_FORMAT_MONO8
		case 16:
			format = C.AL_FORMAT_MONO16
		}
	}

	C.alGenBuffers(1, &s.buffer)
	C.alBufferData(s.buffer, C.ALenum(format), unsafe.Pointer(&s.Data[0]), C.ALsizei(s.Size), C.ALsizei(s.Frequency))
}
예제 #13
0
func alGetSourcef(s Source, k int) float32 {
	var v C.ALfloat
	C.call_alGetSourcef(alGetSourcefFunc, C.ALuint(s), C.ALenum(k), &v)
	return float32(v)
}
예제 #14
0
func alGetSourcei(s Source, k int) int32 {
	var v C.ALint
	C.call_alGetSourcei(alGetSourceiFunc, C.ALuint(s), C.ALenum(k), &v)
	return int32(v)
}
예제 #15
0
func alDistanceModel(v int32) {
	C.call_alDistanceModel(alDistanceModelFunc, C.ALenum(v))
}
예제 #16
0
func alGetString(v int) string {
	value := C.call_alGetString(alGetStringFunc, C.ALenum(v))
	return C.GoString(value)
}
예제 #17
0
func alGetFloat(k int) float32 {
	return float32(C.call_alGetFloat(alGetFloatFunc, C.ALenum(k)))
}
예제 #18
0
func alGetInteger(k int) int32 {
	return int32(C.call_alGetInteger(alGetIntegerFunc, C.ALenum(k)))
}
예제 #19
0
func alGetBufferi(b Buffer, k int) int32 {
	var v C.ALint
	C.call_alGetBufferi(alGetBufferiFunc, C.ALuint(b), C.ALenum(k), &v)
	return int32(v)
}
예제 #20
0
func alListenerf(k int, v float32) {
	C.call_alListenerf(alListenerfFunc, C.ALenum(k), C.ALfloat(v))
}
예제 #21
0
func alSourcefv(s Source, k int, v []float32) {
	C.call_alSourcefv(alSourcefvFunc, C.ALuint(s), C.ALenum(k), (*C.ALfloat)(unsafe.Pointer(&v[0])))
}
예제 #22
0
func alSourcei(s Source, k int, v int32) {
	C.call_alSourcei(alSourcefFunc, C.ALuint(s), C.ALenum(k), C.ALint(v))
}
예제 #23
0
func alSourcef(s Source, k int, v float32) {
	C.call_alSourcef(alSourcefFunc, C.ALuint(s), C.ALenum(k), C.ALfloat(v))
}
예제 #24
0
// Renamed, was GetListener3i.
func (self Listener) Get3i(param int32) (v1, v2, v3 int32) {
	C.walGetListener3i(C.ALenum(param), unsafe.Pointer(&v1),
		unsafe.Pointer(&v2), unsafe.Pointer(&v3))
	return
}
예제 #25
0
func alGetListenerf(k int) float32 {
	var v C.ALfloat
	C.call_alGetListenerf(alListenerfFunc, C.ALenum(k), &v)
	return float32(v)
}
예제 #26
0
// Renamed, was GetListeneriv.
func (self Listener) Getiv(param int32, values []int32) {
	C.walGetListeneriv(C.ALenum(param), unsafe.Pointer(&values[0]))
}
예제 #27
0
func alListenerfv(k int, v []float32) {
	C.call_alListenerfv(alListenerfvFunc, C.ALenum(k), (*C.ALfloat)(unsafe.Pointer(&v[0])))
}
예제 #28
0
func alDisable(capability int32) {
	C.call_alDisable(alDisableFunc, C.ALenum(capability))
}
예제 #29
0
func alBufferData(b Buffer, format uint32, data []byte, freq int32) {
	C.call_alBufferData(alBufferDataFunc, C.ALuint(b), C.ALenum(format), unsafe.Pointer(&data[0]), C.ALsizei(len(data)), C.ALsizei(freq))
}
예제 #30
0
func alIsEnabled(capability int32) bool {
	return C.call_alIsEnabled(alIsEnabledFunc, C.ALenum(capability)) == C.AL_TRUE
}