exp/audio/al: add Capability type, export distance model capability
Fixes golang/go#11298. Change-Id: I3f103a2c1a63e96ca8c7367994179fb32d5ec7db Reviewed-on: https://go-review.googlesource.com/16435 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
c6f2181dba
commit
3ca3fec8ee
|
@ -24,19 +24,22 @@
|
|||
// http://repo.or.cz/w/openal-soft.git/blob/HEAD:/COPYING.
|
||||
package al // import "golang.org/x/mobile/exp/audio/al"
|
||||
|
||||
// Capability represents OpenAL extension capabilities.
|
||||
type Capability int32
|
||||
|
||||
// Enable enables a capability.
|
||||
func Enable(capability int32) {
|
||||
alEnable(capability)
|
||||
func Enable(c Capability) {
|
||||
alEnable(int32(c))
|
||||
}
|
||||
|
||||
// Disable disables a capability.
|
||||
func Disable(capability int32) {
|
||||
alDisable(capability)
|
||||
func Disable(c Capability) {
|
||||
alDisable(int32(c))
|
||||
}
|
||||
|
||||
// Enabled returns true if the specified capability is enabled.
|
||||
func Enabled(capability int32) bool {
|
||||
return alIsEnabled(capability)
|
||||
func Enabled(c Capability) bool {
|
||||
return alIsEnabled(int32(c))
|
||||
}
|
||||
|
||||
// Vector represents an vector in a Cartesian coordinate system.
|
||||
|
|
|
@ -76,3 +76,7 @@ const (
|
|||
FormatStereo8 = 0x1102
|
||||
FormatStereo16 = 0x1103
|
||||
)
|
||||
|
||||
// CapabilityDistanceModel represents the capability of specifying a different distance
|
||||
// model for each source.
|
||||
const CapabilityDistanceModel = Capability(0x200)
|
||||
|
|
Loading…
Reference in New Issue