mp3

package module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 10 Imported by: 3

README

MP3

PkgGoDev Go Report Card Test codecov

Read and write MP3 files with DSP pipeline.

Documentation

Overview

Package mp3 provides pipe components that allow to read/write signal encoded in mp3 format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sink

Sink allows to write mp3 files. Lame uses 5 as default value if not provided.

func Source

Source allows to read mp3 data.

Types

type ABR

type ABR int

ABR uses average bit rate. Values: [8..320]

func (ABR) String

func (abr ABR) String() string

type BitRateMode

type BitRateMode interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

BitRateMode determines which VBR setting is going to be used.

type CBR

type CBR int

CBR uses constant bit rate. Values: [8..320]

func (CBR) String

func (cbr CBR) String() string

type ChannelMode

type ChannelMode int

ChannelMode determines how channel data will be encoded.

const (
	// Mono forcibly generates a mono file. If the input file is a stereo
	// file, the input stream will be read as a mono by averaging the left
	// and right channels.
	Mono ChannelMode = iota
	// Stereo makes no use of potential similarity between the two input
	// channels. It can, however, negotiate the bit demand between both
	// channels, i.e. give one channel more bits if the other contains
	// silence.
	Stereo
	// JointStereo make use of a correlation between both channels. The
	// signal will be matrixed into a sum ("mid") and difference ("side")
	// signal. For quasi-mono signals, this will give a significant gain in
	// encoding quality. This mode does not destroy phase information like
	// IS stereo that may be used by other encoders.
	JointStereo
)

func (ChannelMode) String

func (cm ChannelMode) String() string

type EncodingQuality

type EncodingQuality int

EncodingQuality determines encoding algorithm quality. It doesn't affect file size. Use [0-9] values.

const DefaultEncodingQuality EncodingQuality = -1

DefaultEncodingQuality indicates that no custom quality should be used for encoding algorithm.

type VBR

type VBR int

VBR uses variable bit rate. Values: [0..10]

func (VBR) String

func (vbr VBR) String() string

Jump to

Keyboard shortcuts

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