asset

package
v0.0.0-...-662d8f0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChunkIdx_Nil = ChunkIdx(-1)
)
View Source
const (
	Header_AssetWordSize uint8 = 0x03
)
View Source
const (

	// Spotify inserts a custom Ogg packet at the start with custom metadata values, that you would
	// otherwise expect in Vorbis comments. This packet isn't well-formed and players may balk at it.
	// Search for "parse_from_ogg" in librespot -- https://github.com/librespot-org/librespot
	SPOTIFY_OGG_HEADER_SIZE = 0xa7
)

Variables

This section is empty.

Functions

func ReadU16

func ReadU16(data []byte) (uint16, []byte, error)

func ReadU32

func ReadU32(data []byte) uint32

Types

type ChunkIdx

type ChunkIdx int32 // 0-based index of the chunk in the asset

func ChunkIdxAtOffset

func ChunkIdxAtOffset(byteOfs int64) ChunkIdx

func (ChunkIdx) StartByteOffset

func (ci ChunkIdx) StartByteOffset() int64

type ChunkStatus

type ChunkStatus int32

type Downloader

type Downloader interface {
	HandleCmd(cmd byte, data []byte) error

	// Blocks until the asset is ready to be accessed.
	PinTrack(uri string) (amp.MediaAsset, error)
}

func NewDownloader

func NewDownloader(conn connection.PacketStream, client *mercury.Client) Downloader

Jump to

Keyboard shortcuts

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