audiorecord

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatMono8    = 0x1100
	FormatMono16   = 0x1101
	FormatStereo8  = 0x1102
	FormatStereo16 = 0x1103
)

Format of sound samples passed to Buffer.SetData().

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

View Source
const (
	VOLUMEMAX = 32767.0
	VOLUMEMIN = -32768.0
)

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)

type Recorder

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

func Open

func Open(gco *coroutine.Coroutines) *Recorder

func (*Recorder) Close

func (p *Recorder) Close() error

func (*Recorder) Loudness

func (p *Recorder) Loudness() float64

Jump to

Keyboard shortcuts

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