alc

package
v0.0.0-...-a69e9a6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2014 License: BSD-2-Clause Imports: 3 Imported by: 0

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

View Source
const (
	NoError        = 0
	InvalidDevice  = 0xA001
	InvalidContext = 0xA002
	InvalidEnum    = 0xA003
	InvalidValue   = 0xA004
	OutOfMemory    = 0xA005
)

Error codes returned by Device.GetError().

View Source
const (
	Frequency     = 0x1007 // int Hz
	Refresh       = 0x1008 // int Hz
	Sync          = 0x1009 // bool
	MonoSources   = 0x1010 // int
	StereoSources = 0x1011 // int
)
View Source
const (
	DefaultDeviceSpecifier = 0x1004
	DeviceSpecifier        = 0x1005
	Extensions             = 0x1006
)

The Specifier string for default device?

View Source
const (
	MajorVersion = 0x1000
	MinorVersion = 0x1001
)

?

View Source
const (
	AttributesSize = 0x1002
	AllAttributes  = 0x1003
)

?

View Source
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).

func CurrentContext

func CurrentContext() *Context

Renamed, was GetCurrentContext.

func (*Context) Activate

func (self *Context) Activate() bool

Renamed, was MakeContextCurrent.

func (*Context) Destroy

func (self *Context) Destroy()

Renamed, was DestroyContext.

func (*Context) GetDevice

func (self *Context) GetDevice() *Device

Renamed, was GetContextsDevice.

func (*Context) Process

func (self *Context) Process()

Renamed, was ProcessContext.

func (*Context) Suspend

func (self *Context) Suspend()

Renamed, was SuspendContext.

type Device

type Device struct {
	// contains filtered or unexported fields
}

func OpenDevice

func OpenDevice(name string) *Device

func (*Device) CloseDevice

func (self *Device) CloseDevice() bool

func (*Device) CreateContext

func (self *Device) CreateContext() *Context

func (*Device) GetError

func (self *Device) GetError() uint32

GetError() returns the most recent error generated in the AL state machine.

func (*Device) GetInteger

func (self *Device) GetInteger(param uint32) int32

func (*Device) GetIntegerv

func (self *Device) GetIntegerv(param uint32, size uint32) (result []int32)

Jump to

Keyboard shortcuts

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