al

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2018 License: BSD-2-Clause, Zlib Imports: 3 Imported by: 0

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. Refer to the official OpenAL documentation for more information.

Package al is provided as part of the vu (virtual universe) 3D engine.

Index

Constants

View Source
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 original header for constant documentation.

View Source
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 original 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 Buffer3f

func Buffer3f(bid uint32, param int32, value1, value2, value3 float32)

func Buffer3i

func Buffer3i(bid uint32, param int32, value1, value2, value3 int32)

func BufferData

func BufferData(bid uint32, format int32, data Pointer, size int32, freq int32)

func Bufferf

func Bufferf(bid uint32, param int32, value float32)

func Bufferfv

func Bufferfv(bid uint32, param int32, values *float32)

func Bufferi

func Bufferi(bid uint32, param int32, value int32)

func Bufferiv

func Bufferiv(bid uint32, param int32, values *int32)

func CaptureCloseDevice

func CaptureCloseDevice(device Device) bool

func CaptureSamples

func CaptureSamples(device Device, buffer Pointer, samples int)

func CaptureStart

func CaptureStart(device Device)

func CaptureStop

func CaptureStop(device Device)

func CloseDevice

func CloseDevice(device Device) bool

func DeleteBuffers

func DeleteBuffers(n int32, buffers *uint32)

func DeleteSources

func DeleteSources(n int32, sources *uint32)

func DestroyContext

func DestroyContext(context Context)

func Disable

func Disable(capability int32)

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 Enable

func Enable(capability int32)

AL/al.h go bindings

func GenBuffers

func GenBuffers(n int32, buffers *uint32)

func GenSources

func GenSources(n int32, sources *uint32)

func GetBoolean

func GetBoolean(param int32) bool

func GetBooleanv

func GetBooleanv(param int32, data *int8)

func GetBuffer3f

func GetBuffer3f(bid uint32, param int32, value1, value2, value3 *float32)

func GetBuffer3i

func GetBuffer3i(bid uint32, param int32, value1, value2, value3 *int32)

func GetBufferf

func GetBufferf(bid uint32, param int32, value *float32)

func GetBufferfv

func GetBufferfv(bid uint32, param int32, values *float32)

func GetBufferi

func GetBufferi(bid uint32, param int32, value *int32)

func GetBufferiv

func GetBufferiv(bid uint32, param int32, values *int32)

func GetDeviceEnumValue

func GetDeviceEnumValue(device Device, ename string) int32

func GetDeviceError

func GetDeviceError(device Device) int32

func GetDeviceIntegerv

func GetDeviceIntegerv(device Device, param int32, size int32, data *int32)

func GetDeviceString

func GetDeviceString(device Device, param int32) string

func GetDouble

func GetDouble(param int32) float64

func GetDoublev

func GetDoublev(param int32, data *float64)

func GetEnumValue

func GetEnumValue(ename string) int32

func GetError

func GetError() int32

func GetFloat

func GetFloat(param int32) float32

func GetFloatv

func GetFloatv(param int32, data *float32)

func GetInteger

func GetInteger(param int32) int32

func GetIntegerv

func GetIntegerv(param int32, data *int32)

func GetListener3f

func GetListener3f(param int32, value1, value2, value3 *float32)

func GetListener3i

func GetListener3i(param int32, value1, value2, value3 *int32)

func GetListenerf

func GetListenerf(param int32, value *float32)

func GetListenerfv

func GetListenerfv(param int32, values *float32)

func GetListeneri

func GetListeneri(param int32, value *int32)

func GetListeneriv

func GetListeneriv(param int32, values *int32)

func GetSource3f

func GetSource3f(sid uint32, param int32, value1, value2, value3 *float32)

func GetSource3i

func GetSource3i(sid uint32, param int32, value1, value2, value3 *int32)

func GetSourcef

func GetSourcef(sid uint32, param int32, value *float32)

func GetSourcefv

func GetSourcefv(sid uint32, param int32, values *float32)

func GetSourcei

func GetSourcei(sid uint32, param int32, value *int32)

func GetSourceiv

func GetSourceiv(sid uint32, param int32, values *int32)

func GetString

func GetString(param int32) string

func Init

func Init()

bind the methods to the function pointers

func IsBuffer

func IsBuffer(bid uint32) bool

func IsDeviceExtensionPresent

func IsDeviceExtensionPresent(device Device, extname string) bool

func IsEnabled

func IsEnabled(capability int32) bool

func IsExtensionPresent

func IsExtensionPresent(extname string) bool

func IsSource

func IsSource(sid uint32) bool

func Listener3f

func Listener3f(param int32, value1, value2, value3 float32)

func Listener3i

func Listener3i(param int32, value1, value2, value3 int32)

func Listenerf

func Listenerf(param int32, value float32)

func Listenerfv

func Listenerfv(param int32, values *float32)

func Listeneri

func Listeneri(param int32, value int32)

func Listeneriv

func Listeneriv(param int32, values *int32)

func MakeContextCurrent

func MakeContextCurrent(context Context) bool

func ProcessContext

func ProcessContext(context Context)

func Source3f

func Source3f(sid uint32, param int32, value1, value2, value3 float32)

func Source3i

func Source3i(sid uint32, param int32, value1, value2, value3 int32)

func SourcePause

func SourcePause(sid uint32)

func SourcePausev

func SourcePausev(ns int32, sids *uint32)

func SourcePlay

func SourcePlay(sid uint32)

func SourcePlayv

func SourcePlayv(ns int32, sids *uint32)

func SourceQueueBuffers

func SourceQueueBuffers(sid uint32, numEntries int32, bids *uint32)

func SourceRewind

func SourceRewind(sid uint32)

func SourceRewindv

func SourceRewindv(ns int32, sids *uint32)

func SourceStop

func SourceStop(sid uint32)

func SourceStopv

func SourceStopv(ns int32, sids *uint32)

func SourceUnqueueBuffers

func SourceUnqueueBuffers(sid uint32, numEntries int32, bids *uint32)

func Sourcef

func Sourcef(sid uint32, param int32, value float32)

func Sourcefv

func Sourcefv(sid uint32, param int32, values *float32)

func Sourcei

func Sourcei(sid uint32, param int32, value int32)

func Sourceiv

func Sourceiv(sid uint32, param int32, values *int32)

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

func CreateContext(device Device, attrlist *int32) Context

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 CaptureOpenDevice(devicename string, frequency uint32, format int32, buffersize int32) Device

func GetContextsDevice

func GetContextsDevice(context Context) Device

func OpenDevice

func OpenDevice(devicename string) Device

type Pointer

type Pointer unsafe.Pointer

Special type mappings. Note that the context and device are pointers on Windows and Linux, but integers on OSX.

func GetDeviceProcAddress

func GetDeviceProcAddress(device Device, fname string) Pointer

func GetProcAddress

func GetProcAddress(fname string) Pointer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL