Version: v0.5.1 Latest Latest

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

Go to latest
Published: Apr 25, 2021 License: MIT Imports: 4 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Doorman

type Doorman struct {
	// contains filtered or unexported fields

Doorman is the datastructure that holds the variables for the audio.Node.

func NewDoorman

func NewDoorman(opts ...Option) (*Doorman, error)

NewDoorman returns an instance of a Doorman audio Node. It implements the audio.Node interface. It's purpose is to avoid two clients transmitting audio at the same time. Through a functional option an callback can be provided which will be called whenever the active (transmitting) client changes.

func (*Doorman) SetCb

func (d *Doorman) SetCb(cb audio.OnDataCb)

SetCb sets the callback which will be called when the data has been processed and is ready to be sent to the next audio.Node or audio.Sink.

func (*Doorman) Write

func (d *Doorman) Write(msg audio.Msg) error

Write is the entry point into this audio Node. Writing an audio.Msg will start the processing.

type Option

type Option func(*Options)

Option is the type for a function option

func TXUserChanged

func TXUserChanged(f func(string)) Option

TXUserChanged is a functional option to provide a callback which get's called whenever the transmitting user changes.

type Options

type Options struct {
	// contains filtered or unexported fields

Options contains the parameters for the Doorman

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL