alc

package
v0.0.0-...-a3940bd Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CBool

func CBool(t bool) C.ALCboolean

CBool : Go bool to C bool

func GetString

func GetString(device Device, param Enum) string

func GoBool

func GoBool(t C.ALCboolean) bool

GoBool : C bool to Go bool

func MakeContextCurrent

func MakeContextCurrent(c Context) bool

MakeContextCurrent makes a specified context the current context.

Types

type Boolean

type Boolean int8

Boolean represents a 8-bit boolean value.

const (
	// False represents Boolean False.
	False Boolean = 0
	// True represents Boolean True.
	True Boolean = 1
)

type Byte

type Byte int8

Byte represents a signed 8-bit 2's complement integer.

type CaptureDevice

type CaptureDevice uintptr

func GoCaptureDevice

func GoCaptureDevice(cCaptureDevice *C.ALCdevice) CaptureDevice

GoCaptureDevice : C capture device to Go capture device.

func OpenCaptureDevice

func OpenCaptureDevice(deviceName string, frequency Int, format Enum, bufferSize Sizei) CaptureDevice

func (CaptureDevice) CCaptureDevice

func (d CaptureDevice) CCaptureDevice() *C.ALCdevice

CCaptureDevice : Go capture device to C capture device.

func (CaptureDevice) Close

func (d CaptureDevice) Close() bool

func (CaptureDevice) Samples

func (d CaptureDevice) Samples(buffer []byte, samples Sizei)

func (CaptureDevice) Start

func (d CaptureDevice) Start()

func (CaptureDevice) Stop

func (d CaptureDevice) Stop()

type Char

type Char int8

Char represents a character.

type Context

type Context uintptr

Context represents an OpenAL context.

func CreateContext

func CreateContext(device Device, options map[Int]interface{}) Context

CreateContext creates a context using a specified device.

func CreateDefaultContext

func CreateDefaultContext(device Device) Context

CreateDefaultContext creates a context using a specified device and default attributes.

func GetCurrentContext

func GetCurrentContext() Context

GetCurrentContext retrieves the current context.

func GoContext

func GoContext(cContext *C.ALCcontext) Context

GoContext : C context to Go context.

func (Context) CContext

func (c Context) CContext() *C.ALCcontext

CContext : Go context to C context.

func (Context) Destroy

func (c Context) Destroy()

Destroy destroys context c.

func (Context) Device

func (c Context) Device() Device

Device retrieves context c's device.

func (Context) Process

func (c Context) Process()

Process tells context c to begin processing.

func (Context) Suspend

func (c Context) Suspend()

Suspend suspends processing on context c.

type Device

type Device uintptr

Device represents an OpenAL device.

func GoDevice

func GoDevice(cDevice *C.ALCdevice) Device

GoDevice : C device to Go device.

func OpenDefaultDevice

func OpenDefaultDevice() Device

OpenDefaultDevice opens the default device.

func OpenDevice

func OpenDevice(deviceName string) Device

OpenDevice opens a device by name.

func (Device) CDevice

func (d Device) CDevice() *C.ALCdevice

CDevice : Go device to C device.

func (Device) Close

func (d Device) Close() bool

Close closes device d.

func (Device) GetEnumValue

func (d Device) GetEnumValue(device Device, enumName string) Enum

func (Device) GetProcAddress

func (d Device) GetProcAddress(funcName string) unsafe.Pointer

func (Device) IsExtensionPresent

func (d Device) IsExtensionPresent(extName string) bool

type Double

type Double float64

Double represents a 64-bit IEEE754 floating-point value.

type Enum

type Enum int32

Enum represents an enumerated 32-bit value.

const (
	// NoError indicates there is not currently an error.
	NoError Enum = C.ALC_NO_ERROR
	// InvalidDevice indicates a bad device was passed to an OpenAL function.
	InvalidDevice Enum = C.ALC_INVALID_DEVICE
	// InvalidContext indicates a bad context was passed to an OpenAL function.
	InvalidContext Enum = C.ALC_INVALID_CONTEXT
	// InvalidEnum indicates an unknown enum value was passed to an OpenAL function.
	InvalidEnum Enum = C.ALC_INVALID_ENUM
	// InvalidValue indicate an invalid value was passed to an OpenAL function.
	InvalidValue Enum = C.ALC_INVALID_VALUE
	// OutOfMemory indicates the requested operation resulted in OpenAL running out of memory.
	OutOfMemory Enum = C.ALC_OUT_OF_MEMORY
)
const (
	DefaultDeviceSpecifier        Enum = C.ALC_DEFAULT_DEVICE_SPECIFIER
	DeviceSpecifier               Enum = C.ALC_DEVICE_SPECIFIER
	Extensions                    Enum = C.ALC_EXTENSIONS
	CaptureDeviceSpecifier        Enum = C.ALC_CAPTURE_DEVICE_SPECIFIER
	CaptureDefaultDeviceSpecifier Enum = C.ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
)
const (
	MajorVersion   Enum = C.ALC_MAJOR_VERSION
	MinorVersion   Enum = C.ALC_MINOR_VERSION
	AttributesSize Enum = C.ALC_ATTRIBUTES_SIZE
	AllAttributes  Enum = C.ALC_ALL_ATTRIBUTES
)

func GetError

func GetError(d Device) Enum

GetError retrieves the current context error state.

type Float

type Float float32

Float represents a 32-bit IEEE754 floating-point value.

type Int

type Int int32

Int represents a signed 32-bit 2's complement integer.

const (
	// Frequency represents output frequency. It is specified in <int> Hz.
	Frequency Int = C.ALC_FREQUENCY
	// Refresh represents update rate of context processing. It is specified in <int> Hz.
	Refresh Int = C.ALC_REFRESH
	// Sync is a flag indicating a synchronous context. It is specified using a bool value.
	Sync Int = C.ALC_SYNC
	// MonoSources represents the requested number of mono sources. It is specified by <int> number of requested mono (3D) sources.
	MonoSources Int = C.ALC_MONO_SOURCES
	// StereoSources represents the requested number of stereo sources. It is specified by <int> number of requested stereo sources.
	StereoSources Int = C.ALC_STEREO_SOURCES
)

func GetIntegerv

func GetIntegerv(device Device, param Enum, size Sizei) []Int

type Short

type Short int16

Short represents a signed 16-bit 2's complement integer.

type Sizei

type Sizei int32

Sizei represents a non-negative 32-bit binary integer size.

type Ubyte

type Ubyte uint8

Ubyte represents an unsigned 8-bit integer.

type Uint

type Uint uint32

Uint represents an unsigned 32-bit integer.

type Ushort

type Ushort uint16

Ushort represents an unsigned 16-bit integer.

Jump to

Keyboard shortcuts

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