mixer

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 3 Imported by: 0

README

Mixer

GoDoc Go Report Card Build Status codecov

Mix multiple signals into one.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mixer

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

Mixer summs up multiple channels of messages into a single channel.

func New

func New(numChannels int) *Mixer

New returns new mixer.

func (*Mixer) Flush

func (m *Mixer) Flush(sourceID string) error

Flush mixer data for defined source. All Flush calls are synchronized. It doesn't affect Sink/Pump goroutines.

func (*Mixer) Pump

func (m *Mixer) Pump(outputID string) (func(signal.Float64) error, signal.SampleRate, int, error)

Pump returns a pump function which allows to read the out channel.

func (*Mixer) Sink

func (m *Mixer) Sink(inputID string, sampleRate signal.SampleRate, numChannels int) (func(signal.Float64) error, error)

Sink registers new input. All inputs should have same number of channels. If different number of channels is provided, error will be returned.

Jump to

Keyboard shortcuts

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