Documentation ¶
Index ¶
- type AudioServer
- func (as *AudioServer) Close()
- func (as *AudioServer) Index() int
- func (as *AudioServer) Latency() int
- func (as *AudioServer) Name() string
- func (as *AudioServer) RxAddress() string
- func (as *AudioServer) RxOn() bool
- func (as *AudioServer) ServiceName() string
- func (as *AudioServer) SetNotifyCb(f func())
- func (as *AudioServer) StartRxStream() error
- func (as *AudioServer) StopRxStream() error
- func (as *AudioServer) TxAddress() string
- func (as *AudioServer) TxUser() string
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioServer ¶
AudioServer is a local proxy object respresenting a remote Audio server. It can be considered an abstraction layer so you don't have to take care of sending and receiving messages to the remote audio server. This proxy implementation is based on the micro.mu microservice framework.
func NewAudioServer ¶
func NewAudioServer(name string, client client.Client, doneCh chan struct{}, opts ...Option) (*AudioServer, error)
NewAudioServer is the constructor for the Audioserver proxy. The communication with the remote audio server is done through a micro client. In case the object disappears the doneCh will be closed.
func (*AudioServer) Close ¶
func (as *AudioServer) Close()
Close shutsdown this object and all associated go routines so that it can be garbage collected.
func (*AudioServer) Index ¶
func (as *AudioServer) Index() int
Index returns the static index of the remote audio server. This is only needed for maintaining a consistent order in a GUI if several audio servers are available
func (*AudioServer) Latency ¶
func (as *AudioServer) Latency() int
Latency returns the ping (2-way) latency to the remote audio server.
func (*AudioServer) Name ¶
func (as *AudioServer) Name() string
Name returns the name of the remote audio server
func (*AudioServer) RxAddress ¶
func (as *AudioServer) RxAddress() string
RxAddress returns the address on which the remote audio server is sending out the audio.
func (*AudioServer) RxOn ¶
func (as *AudioServer) RxOn() bool
RxOn returns a boolean which indicates the the remote audio server is streaming audio.
func (*AudioServer) ServiceName ¶
func (as *AudioServer) ServiceName() string
ServiceName returns the fully qualified service name of the remote audio server
func (*AudioServer) SetNotifyCb ¶
func (as *AudioServer) SetNotifyCb(f func())
SetNotifyCb sets a callback which will be executed whenever the state of the server changes.
func (*AudioServer) StartRxStream ¶
func (as *AudioServer) StartRxStream() error
StartRxStream tells the remote audio server to start streaming audio.
func (*AudioServer) StopRxStream ¶
func (as *AudioServer) StopRxStream() error
StopRxStream tells the remote audio server to stop streaming audio.
func (*AudioServer) TxAddress ¶
func (as *AudioServer) TxAddress() string
TxAddress returns the address on which the remote audio server is listening for incoming audio to be transmitted.
func (*AudioServer) TxUser ¶
func (as *AudioServer) TxUser() string
TxUser returns the current user transmitting through the remote audio server. In case nobody is transmitting, an empty string will be returned.