mobile/audio: use AL_TRUE and ALC_TRUE
Change-Id: I8c1a3e72f06a02c18bff3a348e86e78040007867 Reviewed-on: https://go-review.googlesource.com/7770 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
48cfa1a0a0
commit
6ed9b243b1
|
@ -307,7 +307,7 @@ func alDisable(capability int32) {
|
|||
}
|
||||
|
||||
func alIsEnabled(capability int32) bool {
|
||||
return C.call_alIsEnabled(alIsEnabledFunc, C.ALenum(capability)) == 1
|
||||
return C.call_alIsEnabled(alIsEnabledFunc, C.ALenum(capability)) == C.AL_TRUE
|
||||
}
|
||||
|
||||
func alGetInteger(k int) int32 {
|
||||
|
@ -444,5 +444,5 @@ func alBufferData(b Buffer, format uint32, data []byte, freq int32) {
|
|||
}
|
||||
|
||||
func alIsBuffer(b Buffer) bool {
|
||||
return C.call_alIsBuffer(alIsBufferFunc, C.ALuint(b)) == 1
|
||||
return C.call_alIsBuffer(alIsBufferFunc, C.ALuint(b)) == C.AL_TRUE
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ func alDisable(capability int32) {
|
|||
}
|
||||
|
||||
func alIsEnabled(capability int32) bool {
|
||||
return C.alIsEnabled(C.ALenum(capability)) == 1
|
||||
return C.alIsEnabled(C.ALenum(capability)) == C.AL_TRUE
|
||||
}
|
||||
|
||||
func alGetInteger(k int) int32 {
|
||||
|
@ -172,5 +172,5 @@ func alBufferData(b Buffer, format uint32, data []byte, freq int32) {
|
|||
}
|
||||
|
||||
func alIsBuffer(b Buffer) bool {
|
||||
return C.alIsBuffer(C.ALuint(b)) == 1
|
||||
return C.alIsBuffer(C.ALuint(b)) == C.AL_TRUE
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ func alcOpenDevice(name string) unsafe.Pointer {
|
|||
|
||||
func alcCloseDevice(d unsafe.Pointer) bool {
|
||||
dev := (*C.ALCdevice)(d)
|
||||
return C.call_alcCloseDevice(alcCloseDeviceFunc, dev) == 1
|
||||
return C.call_alcCloseDevice(alcCloseDeviceFunc, dev) == C.AL_TRUE
|
||||
}
|
||||
|
||||
func alcCreateContext(d unsafe.Pointer, attrs []int32) unsafe.Pointer {
|
||||
|
@ -64,5 +64,5 @@ func alcCreateContext(d unsafe.Pointer, attrs []int32) unsafe.Pointer {
|
|||
|
||||
func alcMakeContextCurrent(c unsafe.Pointer) bool {
|
||||
ctx := (*C.ALCcontext)(c)
|
||||
return C.call_alcMakeContextCurrent(alcMakeContextCurrentFunc, ctx) == 1
|
||||
return C.call_alcMakeContextCurrent(alcMakeContextCurrentFunc, ctx) == C.AL_TRUE
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ func alcOpenDevice(name string) unsafe.Pointer {
|
|||
|
||||
func alcCloseDevice(d unsafe.Pointer) bool {
|
||||
dev := (*C.ALCdevice)(d)
|
||||
return C.alcCloseDevice(dev) == 1
|
||||
return C.alcCloseDevice(dev) == C.ALC_TRUE
|
||||
}
|
||||
|
||||
func alcCreateContext(d unsafe.Pointer, attrs []int32) unsafe.Pointer {
|
||||
|
@ -54,5 +54,5 @@ func alcCreateContext(d unsafe.Pointer, attrs []int32) unsafe.Pointer {
|
|||
|
||||
func alcMakeContextCurrent(c unsafe.Pointer) bool {
|
||||
ctx := (*C.ALCcontext)(c)
|
||||
return C.alcMakeContextCurrent(ctx) == 1
|
||||
return C.alcMakeContextCurrent(ctx) == C.ALC_TRUE
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue