replay

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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

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

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

Index

Constants

This section is empty.

Variables

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

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 ReplayOpts) (*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 ReplayOpts

type ReplayOpts struct {
	FullFilename string
}

ReplayOpts defines options for this device

Directories

Path Synopsis
Defines an implementation to replay audio
Defines an implementation to replay audio

Jump to

Keyboard shortcuts

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