audio

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: GPL-3.0 Imports: 20 Imported by: 0

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 *log.Entry, 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(ap *ap.Accesspoint) *KeyProvider

func (*KeyProvider) Close

func (p *KeyProvider) Close()

func (*KeyProvider) Request

func (p *KeyProvider) Request(gid []byte, fileId []byte) ([]byte, error)

type MetadataPage

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

func ExtractMetadataPage

func ExtractMetadataPage(r io.ReaderAt, limit int64) (librespot.SizedReadAtSeeker, *MetadataPage, error)

func (MetadataPage) GetAlbumFactor

func (m MetadataPage) GetAlbumFactor(normalisationPregain float32) float32

func (MetadataPage) GetSeekPosition

func (m MetadataPage) GetSeekPosition(samplesPos int64) int64

func (MetadataPage) GetTrackFactor

func (m MetadataPage) GetTrackFactor(normalisationPregain float32) float32

Jump to

Keyboard shortcuts

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