// 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 }
// 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 }
// 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 }
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 }
func GetListener3i(param ALenum) (value1, value2, value3 int32) { C.alGetListener3i( C.ALenum(param), (*C.ALint)(&value1), (*C.ALint)(&value2), (*C.ALint)(&value3), ) return }
func GetListener3f(param ALenum) (value1, value2, value3 float32) { C.alGetListener3f( C.ALenum(param), (*C.ALfloat)(&value1), (*C.ALfloat)(&value2), (*C.ALfloat)(&value3), ) return }
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 }
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 }
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 }
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]) }
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), )) }
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)) }
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) }
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) }
func alDistanceModel(v int32) { C.call_alDistanceModel(alDistanceModelFunc, C.ALenum(v)) }
func alGetString(v int) string { value := C.call_alGetString(alGetStringFunc, C.ALenum(v)) return C.GoString(value) }
func alGetFloat(k int) float32 { return float32(C.call_alGetFloat(alGetFloatFunc, C.ALenum(k))) }
func alGetInteger(k int) int32 { return int32(C.call_alGetInteger(alGetIntegerFunc, C.ALenum(k))) }
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) }
func alListenerf(k int, v float32) { C.call_alListenerf(alListenerfFunc, C.ALenum(k), C.ALfloat(v)) }
func alSourcefv(s Source, k int, v []float32) { C.call_alSourcefv(alSourcefvFunc, C.ALuint(s), C.ALenum(k), (*C.ALfloat)(unsafe.Pointer(&v[0]))) }
func alSourcei(s Source, k int, v int32) { C.call_alSourcei(alSourcefFunc, C.ALuint(s), C.ALenum(k), C.ALint(v)) }
func alSourcef(s Source, k int, v float32) { C.call_alSourcef(alSourcefFunc, C.ALuint(s), C.ALenum(k), C.ALfloat(v)) }
// 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 }
func alGetListenerf(k int) float32 { var v C.ALfloat C.call_alGetListenerf(alListenerfFunc, C.ALenum(k), &v) return float32(v) }
// Renamed, was GetListeneriv. func (self Listener) Getiv(param int32, values []int32) { C.walGetListeneriv(C.ALenum(param), unsafe.Pointer(&values[0])) }
func alListenerfv(k int, v []float32) { C.call_alListenerfv(alListenerfvFunc, C.ALenum(k), (*C.ALfloat)(unsafe.Pointer(&v[0]))) }
func alDisable(capability int32) { C.call_alDisable(alDisableFunc, C.ALenum(capability)) }
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)) }
func alIsEnabled(capability int32) bool { return C.call_alIsEnabled(alIsEnabledFunc, C.ALenum(capability)) == C.AL_TRUE }