recording

package
v0.0.0-...-bf87dab Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package recording manages recording radio streams to files.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMismatchWrite = errors.New("recording: did not write the same number of bytes that were read")
)

Functions

This section is empty.

Types

type Recording

type Recording struct {
	Debug bool
	Err   error
	// contains filtered or unexported fields
}

Recording ...

func New

func New(url, fname string) (*Recording, error)

New creates a new Recording of the given URL to the given filename for output.

func (*Recording) Cancel

func (r *Recording) Cancel()

Cancel stops the recording.

func (*Recording) Done

func (r *Recording) Done() <-chan struct{}

Done returns the done channel of the recording.

func (*Recording) OutputFilename

func (r *Recording) OutputFilename() string

OutputFilename gets the output filename originally passed into New.

func (*Recording) Start

func (r *Recording) Start() error

Start blockingly starts the recording and returns the error if one is encountered while streaming. This should be stopped in another goroutine.

func (*Recording) StartTime

func (r *Recording) StartTime() time.Time

StartTime gets start time

Jump to

Keyboard shortcuts

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