예제 #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
파일: 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
}
예제 #4
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
}
예제 #5
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
}
예제 #6
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))
}
예제 #7
0
func alSourceUnqueueBuffers(s Source, b []Buffer) {
	C.call_alSourceUnqueueBuffers(alSourceUnqueueBuffersFunc, C.ALuint(s), C.ALsizei(len(b)), (*C.ALuint)(unsafe.Pointer(&b[0])))
}
예제 #8
0
func alSourcef(s Source, k int, v float32) {
	C.call_alSourcef(alSourcefFunc, C.ALuint(s), C.ALenum(k), C.ALfloat(v))
}
예제 #9
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)
}
예제 #10
0
파일: core.go 프로젝트: pigulon/go-openal
func GenSource() (source *Source) {
	source = new(Source)
	source.handle = C.ALuint(C.walGenSource())
	return source
}
예제 #11
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was Sourcef.
func (self Source) Setf(param int32, value float32) {
	C.alSourcef(C.ALuint(self), C.ALenum(param), C.ALfloat(value))
}
예제 #12
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was GetSource3i.
func (self Source) Get3i(param int32) (v1, v2, v3 int32) {
	C.walGetSource3i(C.ALuint(self), C.ALenum(param), unsafe.Pointer(&v1),
		unsafe.Pointer(&v2), unsafe.Pointer(&v3))
	return
}
예제 #13
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was GetSourcei.
func (self Source) Geti(param int32) int32 {
	return int32(C.walGetSourcei(C.ALuint(self), C.ALenum(param)))
}
예제 #14
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was GetSourcef.
func (self Source) Getf(param int32) float32 {
	return float32(C.walGetSourcef(C.ALuint(self), C.ALenum(param)))
}
예제 #15
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was Source3i.
func (self Source) Set3i(param int32, value1, value2, value3 int32) {
	C.alSource3i(C.ALuint(self), C.ALenum(param), C.ALint(value1), C.ALint(value2), C.ALint(value3))
}
예제 #16
0
파일: source.go 프로젝트: jaekwon/go-openal
// Convenience method, see Source.QueueBuffers().
func (self Source) QueueBuffer(buffer Buffer) {
	C.walSourceQueueBuffer(C.ALuint(self), C.ALuint(buffer))
}
예제 #17
0
파일: source.go 프로젝트: jaekwon/go-openal
// Convenience method, see Source.QueueBuffers().
func (self Source) UnqueueBuffer() Buffer {
	return Buffer(C.walSourceUnqueueBuffer(C.ALuint(self)))
}
예제 #18
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was GetSourceiv.
func (self Source) Getiv(param int32, values []int32) {
	C.walGetSourceiv(C.ALuint(self), C.ALenum(param), unsafe.Pointer(&values[0]))
}
예제 #19
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was Source3f.
func (self Source) Set3f(param int32, value1, value2, value3 float32) {
	C.alSource3f(C.ALuint(self), C.ALenum(param), C.ALfloat(value1), C.ALfloat(value2), C.ALfloat(value3))
}
예제 #20
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was SourcePlay.
func (self Source) Play() {
	C.alSourcePlay(C.ALuint(self))
}
예제 #21
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)
}
예제 #22
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was SourceStop.
func (self Source) Stop() {
	C.alSourceStop(C.ALuint(self))
}
예제 #23
0
func alSourcei(s Source, k int, v int32) {
	C.call_alSourcei(alSourcefFunc, C.ALuint(s), C.ALenum(k), C.ALint(v))
}
예제 #24
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was SourceRewind.
func (self Source) Rewind() {
	C.alSourceRewind(C.ALuint(self))
}
예제 #25
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])))
}
예제 #26
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was SourcePause.
func (self Source) Pause() {
	C.alSourcePause(C.ALuint(self))
}
예제 #27
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)
}
예제 #28
0
파일: source.go 프로젝트: jaekwon/go-openal
// Renamed, was SourceUnqueueBuffers.
func (self Source) UnqueueBuffers(buffers []Buffer) {
	C.walSourceUnqueueBuffers(C.ALuint(self), C.ALsizei(len(buffers)), unsafe.Pointer(&buffers[0]))
}
예제 #29
0
func alIsBuffer(b Buffer) bool {
	return C.call_alIsBuffer(alIsBufferFunc, C.ALuint(b)) == C.AL_TRUE
}
예제 #30
0
파일: source.go 프로젝트: jaekwon/go-openal
// DeleteSource() deletes a single source.
// Convenience function, see DeleteSources().
func DeleteSource(source Source) {
	C.walDeleteSource(C.ALuint(source))
}