Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type L ¶ added in v0.5.0
type L struct {
// contains filtered or unexported fields
}
L is a pipe(L)ine. It controls the execution of multiple chained pipes. If pipes are not chained, they must be controlled by separate (L)ines. Use Line constructor to instantiate new pipelines.
func (*L) Close ¶ added in v0.5.0
Close must be called to clean up handle's resources. Feedback is closed when line is done.
func (*L) ComponentID ¶ added in v0.5.0
ComponentID finds id of the component within network.
func (*L) Pause ¶ added in v0.5.0
Pause sends a pause event into handle. Calling this method after handle is closed causes a panic. Feedback is closed when Paused state is reached.
func (*L) Push ¶ added in v0.5.0
Push new params into pipe. Calling this method after pipe is closed causes a panic.
type Pipe ¶
Pipe is a pipeline with fully defined sound processing sequence it has:
1 pump 0..n processors 1..n sinks
type Processor ¶
type Processor interface {
Process(pipeID string, sampleRate, numChannels int) (func([][]float64) ([][]float64, error), error)
}
Processor defines interface for pipe-processors
func Processors ¶ added in v0.5.0
Processors is a helper function to use in pipe constructors.
type Pump ¶
type Pump interface {
Pump(pipeID string) (func(bufferSize int) ([][]float64, error), int, int, error)
}
Pump is a source of samples. Pump method returns a new buffer with signal data. Implentetions should use next error conventions:
- nil if a full buffer was read;
- io.EOF if no data was read;
- io.ErrUnexpectedEOF if not a full buffer was read.
The latest case means that pump executed as expected, but not enough data was available. This incomplete buffer still will be sent further and pump will be finished gracefully. If no data was read or any other error was met, buffer should be nil.

