Documentation ¶
Overview ¶
package audio implements the SRS audio client. It is based on the OverlordBot audio client, but with some redesign. See also: https://gitlab.com/overlordbot/srs-bot/-/blob/master/OverlordBot.SimpleRadio/Network/AudioClient.cs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Audio ¶
type Audio []float32
Audio is a type alias for F32LE PCM data TODO turn this into a struct with trace id
type AudioClient ¶
type AudioClient interface { // Frequency returns the SRS frequency this client is configured to receive and transmit on in Hz. Frequency() float64 // Run executes the control loops of the SRS audio client. It should be called exactly once. When the context is canceled or if the client encounters a non-recoverable error, the client will close its resources. Run(context.Context, *sync.WaitGroup) error // Transmit queues the given audio to play on the audio client's SRS frequency. Transmit(Audio) // Receive returns a channel which receives audio from the audio client's SRS frequency. Receive() <-chan Audio LastPing() time.Time }
AudioClient is an SRS audio client configured to receive and transmit on a specific SRS frequency.
func NewClient ¶
func NewClient(guid types.GUID, config types.ClientConfiguration) (AudioClient, error)
Click to show internal directories.
Click to hide internal directories.