player

package
v0.0.0-...-473f5cf Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package player is responsible for playback of the podcast audio

NOTE: a package used in player requires libasound2-dev on Linux. If you are using a Debian-based distro, the following command will install it

apt install libasound2-dev

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecodeFunc

type DecodeFunc func(io.ReadCloser) (s beep.StreamSeekCloser, format beep.Format, err error)

DecodeFunc is the definition for the function signature to decode the audio stream. For example, an MP3 decoder.

type Player

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

Player contains the controls for audio playback

func New

func New(stream io.ReadCloser, decoder DecodeFunc) *Player

New returns a new Player

func (*Player) Start

func (p *Player) Start() error

Start begins playback

func (*Player) Wait

func (p *Player) Wait()

Wait blocks until the player finishes playback

Jump to

Keyboard shortcuts

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