chunk

package module
v0.0.0-...-6dd1195 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: Apache-2.0 Imports: 4 Imported by: 2

README

Chunk

The Chunk package is a tiny little package that is there to represent for all the chunks living in all those audio files around the world.

It doesn't do much and most people don't know about it but it's key to all those sounds you get to hopefully enjoy on a regular bases.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	ID   [4]byte
	Size int
	R    io.Reader
	Pos  int
}

Reader is a struct representing a data chunk. Its reader is shared with the container but convenience methods are provided.

func (*Reader) Done

func (ch *Reader) Done()

Done makes sure the entire Reader was read.

func (*Reader) IsFullyRead

func (ch *Reader) IsFullyRead() bool

IsFullyRead checks if we're finished reading the Reader

func (*Reader) Jump

func (ch *Reader) Jump(bytesAhead int) error

Jump jumps ahead in the Reader

func (*Reader) Read

func (ch *Reader) Read(p []byte) (n int, err error)

Read implements the reader interface

func (*Reader) ReadBE

func (ch *Reader) ReadBE(dst interface{}) error

ReadBE reads the Big Endian Reader data into the passed struct

func (*Reader) ReadByte

func (ch *Reader) ReadByte() (byte, error)

ReadByte reads and returns a single byte

func (*Reader) ReadLE

func (ch *Reader) ReadLE(dst interface{}) error

ReadLE reads the Little Endian Reader data into the passed struct

Jump to

Keyboard shortcuts

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