Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Options)
Option is the type for a function option
func Channels ¶
Channels is a functional option to set the amount of channels to be used with the audio device. Typically this is either Mono (1) or Stereo (2). Make sure that your audio device supports the specified amount of channels.
func Decoder ¶
func Decoder(dec audiocodec.Decoder) Option
Decoder is a functional option to set a specific decoder. By default, the opus decoder is used.
func Samplerate ¶
Samplerate is a functional option to set the sampling rate of the audio device. Make sure your audio device supports the specified sampling rate.
type Options ¶
type Options struct { DeviceName string Decoder audiocodec.Decoder Channels int Samplerate float64 Callback audio.OnDataCb }
Options is the data structure which holds the option values. These values are typically set through functional options.
type PbReader ¶
PbReader implements the audio.Source interface and is used to read audio frames encapsulated in Protocol Buffer messages, typically received from the network.
func NewPbReader ¶
NewPbReader is the constructor for a PbReader object.
func (*PbReader) Enqueue ¶
Enqueue is the entry point for the PbReader. Incoming Protobufs are enqueded with this function.