dca

package
v0.0.0-...-29725af Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrVoiceConnectionClosed = errors.New("voice connection was closed")
)

Functions

This section is empty.

Types

type EncodeSession

type EncodeSession struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func EncodeData

func EncodeData(path string, isOpus, isLocal bool) *EncodeSession

func (*EncodeSession) Cleanup

func (e *EncodeSession) Cleanup()

func (*EncodeSession) FrameDuration

func (e *EncodeSession) FrameDuration() time.Duration

func (*EncodeSession) OpusFrame

func (e *EncodeSession) OpusFrame() ([]byte, error)

func (*EncodeSession) Read

func (e *EncodeSession) Read(p []byte) (n int, err error)

func (*EncodeSession) ReadFrame

func (e *EncodeSession) ReadFrame() ([]byte, error)

func (*EncodeSession) Stop

func (e *EncodeSession) Stop() error

type OpusReader

type OpusReader interface {
	OpusFrame() (frame []byte, err error)
	FrameDuration() time.Duration
}

type StreamingSession

type StreamingSession struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewStream

func NewStream(source *EncodeSession, vc model.VoiceConnection, callback chan error) *StreamingSession

func (*StreamingSession) Finished

func (s *StreamingSession) Finished() (bool, error)

func (*StreamingSession) Pause

func (s *StreamingSession) Pause()

func (*StreamingSession) Paused

func (s *StreamingSession) Paused() bool

func (*StreamingSession) PlaybackPosition

func (s *StreamingSession) PlaybackPosition() int

func (*StreamingSession) Resume

func (s *StreamingSession) Resume()

func (*StreamingSession) Source

func (s *StreamingSession) Source() *EncodeSession

func (*StreamingSession) TogglePause

func (s *StreamingSession) TogglePause()

Jump to

Keyboard shortcuts

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