replay

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Implementation for a replay device. In this case, replays an audio file to stream into a listener

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidInput required input was not found
	ErrInvalidInput = errors.New("required input was not found")
)

errors

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a replay device. In this case, an audio stream.

func New

func New(opts Options) (*Client, error)

New creates an audio replay device

func (*Client) Mute

func (c *Client) Mute()

Mute silences the replay device

func (*Client) Read

func (c *Client) Read() ([]byte, error)

Read bits from the replay device

func (*Client) Start

func (c *Client) Start() error

Start begins streaming the audio for the device

func (*Client) Stop

func (c *Client) Stop() error

Stop terminates the playback on the replay device

func (*Client) Stream

func (c *Client) Stream(w io.Writer) error

Stream is a helper function to stream the replay device data to a source

func (*Client) Unmute

func (c *Client) Unmute()

Unmute restores playback on the replay device

type Options added in v1.3.0

type Options struct {
	FullFilename string
}

ReplayOpts defines options for this device

Jump to

Keyboard shortcuts

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