signal

package
v0.0.0-...-775c6d9 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(ctx context.Context) *engine

func Signals

func Signals() []string

Types

type Engine

type Engine interface {
	Running() binding.Bool
	Generators() binding.UntypedList

	Devices() []string
	DefaultDevice() string
	Device() binding.String
	Destroy()

	ValidateDevice(string) error
}

type Generator

type Generator interface {
	// Name returns the name of the generator
	Name() string
	// Active returns whether this generator is active or not
	Active() binding.Bool

	// Channels returns a Bit array of the channels this generator outputs
	Channels() binding.IntList
	//
	Parameters() []base.NamedParameter

	// FillBuffer is called by the generator engine
	// with a valid buffer. The generator should fill this buffer according
	// to internal generator logic.
	// Modulation argument specifies aggregated modulators output.
	// Internal generator logic should decide what parameters to modulate.
	// Modulation argument may be nil.
	// Length, Channel count and Sample Rate of buf and modulations will
	// always be the same.
	FillBuffer(buf system.SampleBuffer[float64], modulation system.SampleBuffer[float64])

	// Reset will be called after every generator start.
	Reset()
}

Generator represents every generator

func New

func New(name string) (Generator, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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