Documentation ¶
Index ¶
- Constants
- Variables
- type AudioBuffer
- type AudioContext
- func (c *AudioContext) Close()
- func (c *AudioContext) CreateBuffer(numOfChannels, length, sampleRate int) *AudioBuffer
- func (c *AudioContext) CreateGain() *GainNode
- func (c *AudioContext) CreateOscillator() *OscillatorNode
- func (c *AudioContext) Destination() *AudioDestinationNode
- func (c *AudioContext) SampleRate() float32
- type AudioDestinationNode
- type AudioNode
- type AudioParam
- type EndEvent
- type Event
- type EventTarget
- type GainNode
- type Input
- type InputImpl
- type Listener
- type OscillatorNode
- func (o *OscillatorNode) Connect(i Input) error
- func (o *OscillatorNode) Detune() *AudioParam
- func (o *OscillatorNode) Frequency() *AudioParam
- func (o *OscillatorNode) SetType(t string) error
- func (o *OscillatorNode) Start(d float32)
- func (o *OscillatorNode) Stop(d float32)
- func (o *OscillatorNode) Type() string
- type Output
- type OutputImpl
Constants ¶
View Source
const ( CZ = 2 // bytes/1-sample for al.FormatMono16 Fmt = al.FormatMono16 )
View Source
const (
Pi = float32(math.Pi)
)
Variables ¶
View Source
var SampleRate = float32(44100.0)
Functions ¶
This section is empty.
Types ¶
type AudioBuffer ¶
type AudioBuffer struct {
// contains filtered or unexported fields
}
func (*AudioBuffer) ChannelData ¶
func (b *AudioBuffer) ChannelData(n int) []float32
type AudioContext ¶
func New ¶
func New() (*AudioContext, error)
func (*AudioContext) Close ¶
func (c *AudioContext) Close()
func (*AudioContext) CreateBuffer ¶
func (c *AudioContext) CreateBuffer(numOfChannels, length, sampleRate int) *AudioBuffer
func (*AudioContext) CreateGain ¶
func (c *AudioContext) CreateGain() *GainNode
func (*AudioContext) CreateOscillator ¶
func (c *AudioContext) CreateOscillator() *OscillatorNode
func (*AudioContext) Destination ¶
func (c *AudioContext) Destination() *AudioDestinationNode
func (*AudioContext) SampleRate ¶
func (c *AudioContext) SampleRate() float32
type AudioDestinationNode ¶
type AudioDestinationNode struct { *AudioNode *EventTarget }
type AudioNode ¶
type AudioNode struct { sync.RWMutex *InputImpl *OutputImpl // contains filtered or unexported fields }
func (*AudioNode) Context ¶
func (n *AudioNode) Context() *AudioContext
type AudioParam ¶
func (*AudioParam) DefaultValue ¶
func (p *AudioParam) DefaultValue() float32
func (*AudioParam) SetValue ¶
func (p *AudioParam) SetValue(v float32)
func (*AudioParam) Value ¶
func (p *AudioParam) Value() float32
type EndEvent ¶
type EndEvent struct {
// contains filtered or unexported fields
}
func NewEndEvent ¶
func NewEndEvent(target interface{}) *EndEvent
type EventTarget ¶
EventTarget ...
func (*EventTarget) AddEventListener ¶
func (et *EventTarget) AddEventListener(typ string, useCapture bool, cb interface{})
AddEventListener ...
func (*EventTarget) RemoveEventListener ¶
func (et *EventTarget) RemoveEventListener(typ string, useCapture bool, cb interface{})
RemoveEventListener ...
type GainNode ¶
type GainNode struct { sync.RWMutex *AudioNode *EventTarget // contains filtered or unexported fields }
func (*GainNode) Gain ¶
func (g *GainNode) Gain() *AudioParam
type Input ¶
type Input interface { NumberOfInputs() int // contains filtered or unexported methods }
type InputImpl ¶
func (*InputImpl) NumberOfInputs ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener ...
func NewListener ¶
func NewListener(cb interface{}) Listener
type OscillatorNode ¶
type OscillatorNode struct { sync.RWMutex *AudioNode *EventTarget // contains filtered or unexported fields }
func (*OscillatorNode) Connect ¶
func (o *OscillatorNode) Connect(i Input) error
func (*OscillatorNode) Detune ¶
func (o *OscillatorNode) Detune() *AudioParam
func (*OscillatorNode) Frequency ¶
func (o *OscillatorNode) Frequency() *AudioParam
func (*OscillatorNode) SetType ¶
func (o *OscillatorNode) SetType(t string) error
func (*OscillatorNode) Start ¶
func (o *OscillatorNode) Start(d float32)
func (*OscillatorNode) Stop ¶
func (o *OscillatorNode) Stop(d float32)
func (*OscillatorNode) Type ¶
func (o *OscillatorNode) Type() string
type Output ¶
type Output interface { Disconnect() NumberOfOutputs() int // contains filtered or unexported methods }
type OutputImpl ¶
func (*OutputImpl) Disconnect ¶
func (o *OutputImpl) Disconnect()
func (*OutputImpl) NumberOfOutputs ¶
func (o *OutputImpl) NumberOfOutputs() int
Click to show internal directories.
Click to hide internal directories.