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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址