audio

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrManualStop = errors.New("stop")
)

Functions

This section is empty.

Types

type Client

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

func NewVoiceClient

func NewVoiceClient(s *discordgo.Session) *Client

func (*Client) Connect

func (c *Client) Connect(guildID, channelID string) error

Connect TODO: deadlock super rare

func (*Client) Connection

func (c *Client) Connection() *discordgo.VoiceConnection

func (*Client) Disconnect

func (c *Client) Disconnect() error

func (*Client) IsConnected

func (c *Client) IsConnected() bool

type Player

type Player struct {
	Options *dca.EncodeOptions `json:"encodingOptions"`
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer(files filesCache, options *dca.EncodeOptions) *Player

func (*Player) IsPlaying

func (p *Player) IsPlaying() bool

func (*Player) Process

func (p *Player) Process(requests <-chan *SongRequest) <-chan error

func (*Player) Stats

func (p *Player) Stats() pkg.SessionStats

func (*Player) Stop

func (p *Player) Stop()

type SongRequest

type SongRequest struct {
	Voice *discordgo.VoiceConnection
	URI   string
}

Jump to

Keyboard shortcuts

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