processor

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) *processor

func NewThreaded

func NewThreaded(cfg Config) *threadedProcessor

Types

type Config

type Config struct {
	SampleRate   float64          // rate at which samples are read
	SampleSize   int              // number of samples per buffer
	ChannelCount int              // number of channels
	ProcessRate  int              // target framerate
	Buffers      [][]input.Sample // sample buffers
	Analyzer     dsp.Analyzer     // audio analyzer
	Output       Output           // data output
	Smoother     dsp.Smoother     // time smoother
	Windower     window.Function  // data windower
}

type Output added in v1.7.0

type Output interface {
	Bins(int) int
	Write([][]float64, int) error
}

type Processor

type Processor interface {
	Start(ctx context.Context, kickChan chan bool, mu *sync.Mutex) context.Context
	Stop()
	Process()
}

Jump to

Keyboard shortcuts

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