mp3

package module
v0.0.0-...-75602a2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2013 License: MIT Imports: 7 Imported by: 1

README

mp3

Go MP3 Library

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Length

func Length(src io.ReadSeeker) (time.Duration, error)

func Slice

func Slice(src io.ReadSeeker, cutPoints ...time.Duration) ([]io.ReadSeeker, error)

func Splice

func Splice(src io.ReadSeeker, splice map[time.Duration]io.ReadSeeker) (*ioutil.MultiReadSeeker, error)

Take a source MP3 and insert all the splice members into it (at the specified durations)

func Stripped

func Stripped(src io.ReadSeeker) (*ioutil.SectionReader, error)

Types

type ChannelMode

type ChannelMode byte
const (
	Stereo ChannelMode = iota
	JointStereo
	DualChannel
	SingleChannel
)

type Emphasis

type Emphasis byte
const (
	EmphNone Emphasis = iota
	Emph5015
	EmphReserved
	EmphCCITJ17
)

type FrameHeader

type FrameHeader struct {
	Version         Version
	Layer           Layer
	Protection      bool
	Bitrate         int
	SampleRate      int
	Pad             bool
	Private         bool
	ChannelMode     ChannelMode
	IntensityStereo bool
	MSStereo        bool
	CopyRight       bool
	Original        bool
	Emphasis        Emphasis

	Size     int64
	Samples  int
	Duration time.Duration
}

func (*FrameHeader) Parse

func (this *FrameHeader) Parse(bs []byte) error

type Frames

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

func GetFrames

func GetFrames(src io.ReadSeeker) (*Frames, error)

func (*Frames) Error

func (this *Frames) Error() error

func (*Frames) Header

func (this *Frames) Header() *FrameHeader

func (*Frames) Next

func (this *Frames) Next() bool

func (*Frames) Offset

func (this *Frames) Offset() int64

type ID3V2Header

type ID3V2Header struct {
	Version struct {
		Major, Revision byte
	}
	Flags byte
	Size  int64
}

func (*ID3V2Header) Parse

func (this *ID3V2Header) Parse(bs []byte) error

type Layer

type Layer byte
const (
	LayerReserved Layer = iota
	Layer3
	Layer2
	Layer1
)

type Version

type Version byte
const (
	MPEG25 Version = iota
	MPEGReserved
	MPEG2
	MPEG1
)

type XingHeader

type XingHeader struct {
	Frames, Bytes, Quality int
}

func (*XingHeader) Parse

func (this *XingHeader) Parse(src []byte) bool

Parse an Xing header from the first frame of an mp3

Jump to

Keyboard shortcuts

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