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 ¶
func Sink(w io.Writer, brm BitRateMode, cm ChannelMode, eq EncodingQuality) pipe.SinkAllocatorFunc
Sink allows to write mp3 files. Lame uses 5 as default value if not provided.
Types ¶
type BitRateMode ¶
BitRateMode determines which VBR setting is going to be used.
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.
Click to show internal directories.
Click to hide internal directories.