Documentation ¶
Overview ¶
Package al provides golang audio library bindings for OpenAL. Official OpenAL documentation can be found online. Prepend "AL_" to the function or constant names found in this package.
These bindings were based on the OpenAL header files found at:
http://repo.or.cz/w/openal-soft.git/blob/6dab9d54d1719105e0183f941a2b3dd36e9ba902:/include/AL/al.h http://repo.or.cz/w/openal-soft.git/blob/6dab9d54d1719105e0183f941a2b3dd36e9ba902:/include/AL/alc.h
Refer to the orginal header files and official OpenAL documentation for more information.
Package al is provided as part of the vu (virtual universe) 3D engine.
Index ¶
- Constants
- func BindingReport() (report []string)
- func Buffer3f(bid uint32, param int32, value1, value2, value3 float32)
- func Buffer3i(bid uint32, param int32, value1, value2, value3 int32)
- func BufferData(bid uint32, format int32, data Pointer, size int32, freq int32)
- func Bufferf(bid uint32, param int32, value float32)
- func Bufferfv(bid uint32, param int32, values *float32)
- func Bufferi(bid uint32, param int32, value int32)
- func Bufferiv(bid uint32, param int32, values *int32)
- func CaptureCloseDevice(device Device) bool
- func CaptureSamples(device Device, buffer Pointer, samples int)
- func CaptureStart(device Device)
- func CaptureStop(device Device)
- func CloseDevice(device Device) bool
- func DeleteBuffers(n int32, buffers *uint32)
- func DeleteSources(n int32, sources *uint32)
- func DestroyContext(context Context)
- func Disable(capability int32)
- func DistanceModel(distanceModel float32)
- func DopplerFactor(value float32)
- func DopplerVelocity(value float32)
- func Dump()
- func Enable(capability int32)
- func GenBuffers(n int32, buffers *uint32)
- func GenSources(n int32, sources *uint32)
- func GetBoolean(param int32) bool
- func GetBooleanv(param int32, data *int8)
- func GetBuffer3f(bid uint32, param int32, value1, value2, value3 *float32)
- func GetBuffer3i(bid uint32, param int32, value1, value2, value3 *int32)
- func GetBufferf(bid uint32, param int32, value *float32)
- func GetBufferfv(bid uint32, param int32, values *float32)
- func GetBufferi(bid uint32, param int32, value *int32)
- func GetBufferiv(bid uint32, param int32, values *int32)
- func GetDeviceEnumValue(device Device, ename string) int32
- func GetDeviceError(device Device) int32
- func GetDeviceIntegerv(device Device, param int32, size int32, data *int32)
- func GetDeviceString(device Device, param int32) string
- func GetDouble(param int32) float64
- func GetDoublev(param int32, data *float64)
- func GetEnumValue(ename string) int32
- func GetError() int32
- func GetFloat(param int32) float32
- func GetFloatv(param int32, data *float32)
- func GetInteger(param int32) int32
- func GetIntegerv(param int32, data *int32)
- func GetListener3f(param int32, value1, value2, value3 *float32)
- func GetListener3i(param int32, value1, value2, value3 *int32)
- func GetListenerf(param int32, value *float32)
- func GetListenerfv(param int32, values *float32)
- func GetListeneri(param int32, value *int32)
- func GetListeneriv(param int32, values *int32)
- func GetSource3f(sid uint32, param int32, value1, value2, value3 *float32)
- func GetSource3i(sid uint32, param int32, value1, value2, value3 *int32)
- func GetSourcef(sid uint32, param int32, value *float32)
- func GetSourcefv(sid uint32, param int32, values *float32)
- func GetSourcei(sid uint32, param int32, value *int32)
- func GetSourceiv(sid uint32, param int32, values *int32)
- func GetString(param int32) string
- func Init()
- func IsBuffer(bid uint32) bool
- func IsDeviceExtensionPresent(device Device, extname string) bool
- func IsEnabled(capability int32) bool
- func IsExtensionPresent(extname string) bool
- func IsSource(sid uint32) bool
- func Listener3f(param int32, value1, value2, value3 float32)
- func Listener3i(param int32, value1, value2, value3 int32)
- func Listenerf(param int32, value float32)
- func Listenerfv(param int32, values *float32)
- func Listeneri(param int32, value int32)
- func Listeneriv(param int32, values *int32)
- func MakeContextCurrent(context Context) bool
- func ProcessContext(context Context)
- func Source3f(sid uint32, param int32, value1, value2, value3 float32)
- func Source3i(sid uint32, param int32, value1, value2, value3 int32)
- func SourcePause(sid uint32)
- func SourcePausev(ns int32, sids *uint32)
- func SourcePlay(sid uint32)
- func SourcePlayv(ns int32, sids *uint32)
- func SourceQueueBuffers(sid uint32, numEntries int32, bids *uint32)
- func SourceRewind(sid uint32)
- func SourceRewindv(ns int32, sids *uint32)
- func SourceStop(sid uint32)
- func SourceStopv(ns int32, sids *uint32)
- func SourceUnqueueBuffers(sid uint32, numEntries int32, bids *uint32)
- func Sourcef(sid uint32, param int32, value float32)
- func Sourcefv(sid uint32, param int32, values *float32)
- func Sourcei(sid uint32, param int32, value int32)
- func Sourceiv(sid uint32, param int32, values *int32)
- func SpeedOfSound(value float32)
- func SuspendContext(context Context)
- type Context
- type Device
- type Pointer
Constants ¶
const ( FALSE = 0 TRUE = 1 NONE = 0 NO_ERROR = 0 SOURCE_RELATIVE = 0x202 CONE_INNER_ANGLE = 0x1001 CONE_OUTER_ANGLE = 0x1002 PITCH = 0x1003 POSITION = 0x1004 DIRECTION = 0x1005 VELOCITY = 0x1006 LOOPING = 0x1007 BUFFER = 0x1009 GAIN = 0x100A MIN_GAIN = 0x100D MAX_GAIN = 0x100E ORIENTATION = 0x100F SOURCE_STATE = 0x1010 INITIAL = 0x1011 PLAYING = 0x1012 PAUSED = 0x1013 STOPPED = 0x1014 BUFFERS_QUEUED = 0x1015 BUFFERS_PROCESSED = 0x1016 SEC_OFFSET = 0x1024 SAMPLE_OFFSET = 0x1025 BYTE_OFFSET = 0x1026 SOURCE_TYPE = 0x1027 STATIC = 0x1028 STREAMING = 0x1029 UNDETERMINED = 0x1030 FORMAT_MONO8 = 0x1100 FORMAT_MONO16 = 0x1101 FORMAT_STEREO8 = 0x1102 FORMAT_STEREO16 = 0x1103 REFERENCE_DISTANCE = 0x1020 ROLLOFF_FACTOR = 0x1021 CONE_OUTER_GAIN = 0x1022 MAX_DISTANCE = 0x1023 FREQUENCY = 0x2001 BITS = 0x2002 CHANNELS = 0x2003 SIZE = 0x2004 UNUSED = 0x2010 PENDING = 0x2011 PROCESSED = 0x2012 INVALID_NAME = 0xA001 INVALID_ENUM = 0xA002 INVALID_VALUE = 0xA003 INVALID_OPERATION = 0xA004 OUT_OF_MEMORY = 0xA005 VENDOR = 0xB001 VERSION = 0xB002 RENDERER = 0xB003 EXTENSIONS = 0xB004 DOPPLER_FACTOR = 0xC000 DOPPLER_VELOCITY = 0xC001 SPEED_OF_SOUND = 0xC003 DISTANCE_MODEL = 0xD000 INVERSE_DISTANCE = 0xD001 INVERSE_DISTANCE_CLAMPED = 0xD002 LINEAR_DISTANCE = 0xD003 LINEAR_DISTANCE_CLAMPED = 0xD004 EXPONENT_DISTANCE = 0xD005 EXPONENT_DISTANCE_CLAMPED = 0xD006 )
AL/al.h constants (with AL_ removed). Refer to the orginal header for constant documentation.
const ( C_FALSE = 0 C_TRUE = 1 C_NO_ERROR = 0 C_FREQUENCY = 0x1007 C_REFRESH = 0x1008 C_SYNC = 0x1009 C_MONO_SOURCES = 0x1010 C_STEREO_SOURCES = 0x1011 C_INVALID_DEVICE = 0xA001 C_INVALID_CONTEXT = 0xA002 C_INVALID_ENUM = 0xA003 C_INVALID_VALUE = 0xA004 C_OUT_OF_MEMORY = 0xA005 C_DEFAULT_DEVICE_SPECIFIER = 0x1004 C_DEVICE_SPECIFIER = 0x1005 C_EXTENSIONS = 0x1006 C_MAJOR_VERSION = 0x1000 C_MINOR_VERSION = 0x1001 C_ATTRIBUTES_SIZE = 0x1002 C_ALL_ATTRIBUTES = 0x1003 C_CAPTURE_DEVICE_SPECIFIER = 0x310 C_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311 C_CAPTURE_SAMPLES = 0x312 )
AL/alc.h constants (with AL removed). Refer to the orginal header for constant documentation.
Variables ¶
This section is empty.
Functions ¶
func BindingReport ¶
func BindingReport() (report []string)
Show which function pointers are bound [+] or not bound [-]. Expected to be used as a sanity check to see if the OpenAL libraries exist.
func CaptureCloseDevice ¶
func CaptureSamples ¶
func CaptureStart ¶
func CaptureStart(device Device)
func CaptureStop ¶
func CaptureStop(device Device)
func CloseDevice ¶
func DeleteBuffers ¶
func DeleteSources ¶
func DestroyContext ¶
func DestroyContext(context Context)
func DistanceModel ¶
func DistanceModel(distanceModel float32)
func DopplerFactor ¶
func DopplerFactor(value float32)
func DopplerVelocity ¶
func DopplerVelocity(value float32)
func Dump ¶
func Dump()
Dump shows which OpenAL functions have been bound to an underlying implementation and which haven't. This is not a guarantee that the bound functionality will work, but is an indication of what is supported on the current platform. Bindings can be dumped even without an active OpenAL context.
Bound functions are indicated with [+] and unbound with [ ].
func GenBuffers ¶
func GenSources ¶
func GetBoolean ¶
func GetBooleanv ¶
func GetBuffer3f ¶
func GetBuffer3i ¶
func GetBufferf ¶
func GetBufferfv ¶
func GetBufferi ¶
func GetBufferiv ¶
func GetDeviceEnumValue ¶
func GetDeviceError ¶
func GetDeviceIntegerv ¶
func GetDeviceString ¶
func GetDoublev ¶
func GetEnumValue ¶
func GetInteger ¶
func GetIntegerv ¶
func GetListener3f ¶
func GetListener3i ¶
func GetListenerf ¶
func GetListenerfv ¶
func GetListeneri ¶
func GetListeneriv ¶
func GetSource3f ¶
func GetSource3i ¶
func GetSourcef ¶
func GetSourcefv ¶
func GetSourcei ¶
func GetSourceiv ¶
func IsExtensionPresent ¶
func Listener3f ¶
func Listener3i ¶
func Listenerfv ¶
func Listeneriv ¶
func MakeContextCurrent ¶
func ProcessContext ¶
func ProcessContext(context Context)
func SourcePause ¶
func SourcePause(sid uint32)
func SourcePausev ¶
func SourcePlay ¶
func SourcePlay(sid uint32)
func SourcePlayv ¶
func SourceQueueBuffers ¶
func SourceRewind ¶
func SourceRewind(sid uint32)
func SourceRewindv ¶
func SourceStop ¶
func SourceStop(sid uint32)
func SourceStopv ¶
func SourceUnqueueBuffers ¶
func SpeedOfSound ¶
func SpeedOfSound(value float32)
func SuspendContext ¶
func SuspendContext(context Context)
Types ¶
type Context ¶
type Context uintptr // C.struct_ALCcontext_struct
Special type mappings. Note that the context and device are pointers on Windows and Linux, but integers on OSX.
func CreateContext ¶
AL/alc.h go bindings
func GetCurrentContext ¶
func GetCurrentContext() Context
type Device ¶
type Device uintptr // C.struct_ALCdevice_struct
Special type mappings. Note that the context and device are pointers on Windows and Linux, but integers on OSX.
func CaptureOpenDevice ¶
func GetContextsDevice ¶
func OpenDevice ¶
type Pointer ¶
Special type mappings. Note that the context and device are pointers on Windows and Linux, but integers on OSX.