Documentation ¶
Overview ¶
C-level binding for OpenAL's "alc" API.
Please consider using the Go-level binding instead.
Note that "alc" introduces the exact same types as "al" but with different names. Check the documentation of openal/al for more information about the mapping to Go types.
XXX: Sadly we have to returns pointers for both Device and Context to avoid problems with implicit assignments in clients. It's sad because it makes the overhead a lot higher, each of those calls triggers an allocation.
Index ¶
Constants ¶
const ( NoError = 0 InvalidDevice = 0xA001 InvalidContext = 0xA002 InvalidEnum = 0xA003 InvalidValue = 0xA004 OutOfMemory = 0xA005 )
Error codes returned by Device.GetError().
const ( Frequency = 0x1007 // int Hz Refresh = 0x1008 // int Hz Sync = 0x1009 // bool MonoSources = 0x1010 // int StereoSources = 0x1011 // int )
const ( DefaultDeviceSpecifier = 0x1004 DeviceSpecifier = 0x1005 Extensions = 0x1006 )
The Specifier string for default device?
const ( MajorVersion = 0x1000 MinorVersion = 0x1001 )
?
const ( AttributesSize = 0x1002 AllAttributes = 0x1003 )
?
const ( CaptureDeviceSpecifier = 0x310 CaptureDefaultDeviceSpecifier = 0x311 CaptureSamples = 0x312 )
Capture extension
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptureDevice ¶
type CaptureDevice struct { Device // contains filtered or unexported fields }
func CaptureOpenDevice ¶
func CaptureOpenDevice(name string, freq uint32, format uint32, size uint32) *CaptureDevice
func (*CaptureDevice) CaptureCloseDevice ¶
func (self *CaptureDevice) CaptureCloseDevice() bool
func (*CaptureDevice) CaptureSamples ¶
func (self *CaptureDevice) CaptureSamples(size uint32) (data []byte)
func (*CaptureDevice) CaptureStart ¶
func (self *CaptureDevice) CaptureStart()
func (*CaptureDevice) CaptureStop ¶
func (self *CaptureDevice) CaptureStop()
func (*CaptureDevice) CloseDevice ¶
func (self *CaptureDevice) CloseDevice() bool
XXX: Override Device.CloseDevice to make sure the correct C function is called even if someone decides to use this behind an interface.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context encapsulates the state of a given instance of the OpenAL state machine. Only one context can be active in a given process.
var NullContext Context
A context that doesn't exist, useful for certain context operations (see OpenAL documentation for details).
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
func OpenDevice ¶
func (*Device) CloseDevice ¶
func (*Device) CreateContext ¶
func (*Device) GetError ¶
GetError() returns the most recent error generated in the AL state machine.