Documentation
¶
Index ¶
- type Bitcrush
- func (bitcrush *Bitcrush) Active() bool
- func (bitcrush *Bitcrush) ApplyEffect(p []byte, bytesRead int)
- func (bitcrush *Bitcrush) Clone() resound.IEffect
- func (bitcrush *Bitcrush) Read(p []byte) (n int, err error)
- func (bitcrush *Bitcrush) Seek(offset int64, whence int) (int64, error)
- func (bitcrush *Bitcrush) SetActive(active bool) *Bitcrush
- func (bitcrush *Bitcrush) SetSource(source io.ReadSeeker)
- func (bitcrush *Bitcrush) SetStrength(bitcrushFactor float64) *Bitcrush
- func (bitcrush *Bitcrush) Strength() float64
- type Delay
- func (delay *Delay) Active() bool
- func (delay *Delay) ApplyEffect(p []byte, bytesRead int)
- func (delay *Delay) Clone() resound.IEffect
- func (delay *Delay) FeedbackLoop() bool
- func (delay *Delay) Read(p []byte) (n int, err error)
- func (delay *Delay) Seek(offset int64, whence int) (int64, error)
- func (delay *Delay) SetActive(active bool) *Delay
- func (delay *Delay) SetFeedbackLoop(on bool) *Delay
- func (delay *Delay) SetSource(source io.ReadSeeker)
- func (delay *Delay) SetStrength(strength float64) *Delay
- func (delay *Delay) SetWait(waitTime float64) *Delay
- func (delay *Delay) Strength() float64
- func (delay *Delay) Wait() float64
- type Distort
- func (distort *Distort) Active() bool
- func (distort *Distort) ApplyEffect(p []byte, bytesRead int)
- func (distort *Distort) Clone() resound.IEffect
- func (distort *Distort) CrushPercentage() float64
- func (distort *Distort) Read(p []byte) (n int, err error)
- func (distort *Distort) Seek(offset int64, whence int) (int64, error)
- func (distort *Distort) SetActive(active bool) *Distort
- func (distort *Distort) SetCrushPercentage(strength float64) *Distort
- func (distort *Distort) SetSource(source io.ReadSeeker)
- type LowpassFilter
- func (lpf *LowpassFilter) Active() bool
- func (lpf *LowpassFilter) ApplyEffect(p []byte, bytesRead int)
- func (lpf *LowpassFilter) Clone() resound.IEffect
- func (lpf *LowpassFilter) Read(p []byte) (n int, err error)
- func (lpf *LowpassFilter) Seek(offset int64, whence int) (int64, error)
- func (lpf *LowpassFilter) SetActive(active bool) *LowpassFilter
- func (lpf *LowpassFilter) SetSource(source io.ReadSeeker)
- func (lpf *LowpassFilter) SetStrength(strength float64) *LowpassFilter
- func (lpf *LowpassFilter) Strength() float64
- type Pan
- func (pan *Pan) Active() bool
- func (pan *Pan) ApplyEffect(p []byte, bytesRead int)
- func (pan *Pan) Clone() resound.IEffect
- func (pan *Pan) Pan() float64
- func (pan *Pan) Read(p []byte) (n int, err error)
- func (pan *Pan) Seek(offset int64, whence int) (int64, error)
- func (pan *Pan) SetActive(active bool) *Pan
- func (pan *Pan) SetPan(panPercent float64) *Pan
- func (pan *Pan) SetSource(source io.ReadSeeker)
- type Volume
- func (volume *Volume) Active() bool
- func (volume *Volume) ApplyEffect(p []byte, bytesRead int)
- func (volume *Volume) Clone() resound.IEffect
- func (volume *Volume) Read(p []byte) (n int, err error)
- func (volume *Volume) Seek(offset int64, whence int) (int64, error)
- func (volume *Volume) SetActive(active bool)
- func (volume *Volume) SetNormalizationFactor(normalization float64)
- func (volume *Volume) SetSource(source io.ReadSeeker)
- func (volume *Volume) SetStrength(strength float64) *Volume
- func (volume *Volume) Strength() float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitcrush ¶
type Bitcrush struct { Source io.ReadSeeker // contains filtered or unexported fields }
Bitcrush is an effect that changes the pitch of the incoming audio byte stream.
func NewBitcrush ¶
func NewBitcrush(source io.ReadSeeker) *Bitcrush
NewBitcrush creates a new Bitcrush effect. source is the source stream to apply this effect to. If you add this effect to a DSPChannel, there's no need to pass a source, as it will take effect for whatever streams are played through the DSPChannel.
func (*Bitcrush) ApplyEffect ¶
func (*Bitcrush) SetSource ¶
func (bitcrush *Bitcrush) SetSource(source io.ReadSeeker)
SetSource sets the active source for the effect.
func (*Bitcrush) SetStrength ¶
SetStrength sets the strength of the Bitcrush effect to the specified percentage.
type Delay ¶
type Delay struct { Source io.ReadSeeker // contains filtered or unexported fields }
Delay is an effect that adds a delay to the sound.
func NewDelay ¶
func NewDelay(source io.ReadSeeker) *Delay
NewDelay creates a new Delay effect. If you add this effect to a DSPChannel, source can be nil, as it will take effect for whatever streams are played through the DSPChannel.
func (*Delay) ApplyEffect ¶
func (*Delay) FeedbackLoop ¶
FeedbackLoop returns if the delay's results feed back into itself or not.
func (*Delay) SetFeedbackLoop ¶
SetFeedbackLoop sets the feedback loop of the delay. If set to on, the delay's results feed back into itself.
func (*Delay) SetSource ¶
func (delay *Delay) SetSource(source io.ReadSeeker)
SetSource sets the active source for the effect.
func (*Delay) SetStrength ¶
SetStrength sets the overall volume of the Delay effect as it's added on top of the original signal. 0 is the minimum value.
func (*Delay) SetWait ¶
SetWait sets the overall wait time of the Delay effect in seconds as it's added on top of the original signal. 0 is the minimum value.
type Distort ¶
type Distort struct { Source io.ReadSeeker // contains filtered or unexported fields }
Distort distorts the stream that plays through it, clipping the signal.
func NewDistort ¶
func NewDistort(source io.ReadSeeker) *Distort
NewDistort creates a new Distort effect. source is the source stream to apply the effect to. If you add this effect to a DSPChannel, you can pass nil as the source, as it will take effect for whatever streams are played through the DSPChannel.
func (*Distort) ApplyEffect ¶
func (*Distort) CrushPercentage ¶
CrushPercentage returns the crush percentage of the Distort effect.
func (*Distort) SetCrushPercentage ¶
SetCrushPercentage sets the overall crush percentage of the Distort effect. Any value below this in percentage amplitude is rounded off. 0 is the minimum value.
func (*Distort) SetSource ¶
func (distort *Distort) SetSource(source io.ReadSeeker)
SetSource sets the active source for the effect.
type LowpassFilter ¶
type LowpassFilter struct { Source io.ReadSeeker // contains filtered or unexported fields }
func NewLowpassFilter ¶
func NewLowpassFilter(source io.ReadSeeker) *LowpassFilter
NewLowpassFilter creates a new low-pass filter for the given source stream. If you add this effect to a DSPChannel, there's no need to pass a source, as it will take effect for whatever streams are played through the DSPChannel.
func (*LowpassFilter) Active ¶
func (lpf *LowpassFilter) Active() bool
Active returns if the effect is active.
func (*LowpassFilter) ApplyEffect ¶
func (lpf *LowpassFilter) ApplyEffect(p []byte, bytesRead int)
func (*LowpassFilter) Clone ¶
func (lpf *LowpassFilter) Clone() resound.IEffect
Clone clones the effect, returning an resound.IEffect.
func (*LowpassFilter) Seek ¶
func (lpf *LowpassFilter) Seek(offset int64, whence int) (int64, error)
func (*LowpassFilter) SetActive ¶
func (lpf *LowpassFilter) SetActive(active bool) *LowpassFilter
SetActive sets the effect to be active.
func (*LowpassFilter) SetSource ¶
func (lpf *LowpassFilter) SetSource(source io.ReadSeeker)
SetSource sets the active source for the effect.
func (*LowpassFilter) SetStrength ¶
func (lpf *LowpassFilter) SetStrength(strength float64) *LowpassFilter
func (*LowpassFilter) Strength ¶
func (lpf *LowpassFilter) Strength() float64
type Pan ¶
type Pan struct { Source io.ReadSeeker // contains filtered or unexported fields }
Pan is a panning effect, handling panning the sound between the left and right channels.
func NewPan ¶
func NewPan(source io.ReadSeeker) *Pan
NewPan creates a new Pan effect. source is the source stream to apply the effect on. Panning defaults to 0. If you add this effect to a DSPChannel, source can be nil, as it will take effect for whatever streams are played through the DSPChannel.
func (*Pan) ApplyEffect ¶
func (*Pan) Pan ¶
Pan returns the panning value for the pan effect in a percentage, ranging from -1 (hard left) to 1 (hard right).
func (*Pan) SetPan ¶
SetPan sets the panning percentage for the pan effect. The possible values range from -1 (hard left) to 1 (hard right).
func (*Pan) SetSource ¶
func (pan *Pan) SetSource(source io.ReadSeeker)
SetSource sets the active source for the effect.
type Volume ¶
type Volume struct { Source io.ReadSeeker // contains filtered or unexported fields }
Volume is an effect that changes the overall volume of the incoming audio byte stream.
func NewVolume ¶
func NewVolume(source io.ReadSeeker) *Volume
NewVolume creates a new Volume effect. source is the source stream to apply this effect to. If you add this effect to a DSPChannel, source can be nil, as it will take effect for whatever streams are played through the DSPChannel.
func (*Volume) ApplyEffect ¶
func (*Volume) SetNormalizationFactor ¶
SetNormalizationFactor sets the normalization factor for the Volume effect. This should be obtained from an AudioProperties Analysis.
func (*Volume) SetSource ¶
func (volume *Volume) SetSource(source io.ReadSeeker)
SetSource sets the active source for the effect.
func (*Volume) SetStrength ¶
SetStrength sets the strength of the Volume effect to the specified percentage. The lowest possible value is 0.0, with 1.0 taking a 100% effect. The volume is altered on a sine-based easing curve. At over 100% volume, the sound is clipped as necessary.