audio

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: GPL-3.0 Imports: 17 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultChunkSize = 512 * 1024
	PrefetchCount    = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decryptor

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

func NewAesAudioDecryptor

func NewAesAudioDecryptor(r io.ReaderAt, key []byte) (*Decryptor, error)

func (*Decryptor) Close

func (a *Decryptor) Close() error

func (*Decryptor) ReadAt

func (a *Decryptor) ReadAt(p []byte, pos int64) (n int, err error)

type HttpChunkedReader

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

func NewHttpChunkedReader

func NewHttpChunkedReader(log librespot.Logger, client *http.Client, audioUrl string) (_ *HttpChunkedReader, err error)

func (*HttpChunkedReader) Read

func (r *HttpChunkedReader) Read(p []byte) (n int, err error)

func (*HttpChunkedReader) ReadAt

func (r *HttpChunkedReader) ReadAt(p []byte, pos int64) (n int, _ error)

func (*HttpChunkedReader) Seek

func (r *HttpChunkedReader) Seek(offset int64, whence int) (int64, error)

func (*HttpChunkedReader) Size

func (r *HttpChunkedReader) Size() int64

type KeyProvider

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

func NewAudioKeyProvider

func NewAudioKeyProvider(log librespot.Logger, ap *ap.Accesspoint) *KeyProvider

func (*KeyProvider) Close

func (p *KeyProvider) Close()

func (*KeyProvider) Request

func (p *KeyProvider) Request(ctx context.Context, gid []byte, fileId []byte) ([]byte, error)

type KeyProviderError added in v0.2.0

type KeyProviderError struct {
	Code uint16
}

func (KeyProviderError) Error added in v0.2.0

func (e KeyProviderError) Error() string

Jump to

Keyboard shortcuts

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