mixer

package
v0.0.0-...-9401d5b Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInputBufferFrames = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

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

func (*Input) Close

func (i *Input) Close() error

func (*Input) SampleRate

func (i *Input) SampleRate() int

func (*Input) String

func (i *Input) String() string

func (*Input) WriteSample

func (i *Input) WriteSample(sample msdk.PCM16Sample) error

type Mixer

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

func NewMixer

func NewMixer(out msdk.Writer[msdk.PCM16Sample], bufferDur time.Duration, st *Stats, channels int, inputBufferFrames int) (*Mixer, error)

func (*Mixer) NewInput

func (m *Mixer) NewInput() *Input

func (*Mixer) RemoveInput

func (m *Mixer) RemoveInput(inp *Input)

func (*Mixer) SampleRate

func (m *Mixer) SampleRate() int

func (*Mixer) Stop

func (m *Mixer) Stop()

func (*Mixer) String

func (m *Mixer) String() string

type Stats

type Stats struct {
	Tracks      atomic.Int64
	TracksTotal atomic.Uint64
	Restarts    atomic.Uint64

	Mixes      atomic.Uint64
	TimedMixes atomic.Uint64
	JumpMixes  atomic.Uint64
	ZeroMixes  atomic.Uint64

	InputSamples atomic.Uint64
	InputFrames  atomic.Uint64

	MixedSamples atomic.Uint64
	MixedFrames  atomic.Uint64

	OutputSamples atomic.Uint64
	OutputFrames  atomic.Uint64
}

Jump to

Keyboard shortcuts

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