player

package
v0.0.0-...-2a37e75 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

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

Player holds the necessary data and structs to control the player

func NewPlayer

func NewPlayer(c *soundcloud.Client, tc <-chan soundcloud.Track, toggle <-chan bool, next chan<- bool, streamerc chan<- *StreamerFormat) *Player

NewPlayer will return a new player

func (*Player) Start

func (p *Player) Start(t soundcloud.Track) error

Start will start the player, starting with the given track

func (*Player) StreamerFromTrack

func (p *Player) StreamerFromTrack(t soundcloud.Track) (*StreamerFormat, io.ReadCloser, error)

StreamerFromTrack will retrieve a stream from the track and return the streamer, format and total duration, as well as the source

type StreamerFormat

type StreamerFormat struct {
	Streamer      beep.StreamSeekCloser
	Format        beep.Format
	TotalDuration time.Duration
}

StreamerFormat is a struct holding both a streamer and a format

Jump to

Keyboard shortcuts

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