Skip to content

pkgs/audio/codec/mp3

Provides MP3 stream decode, and PCM-to-MP3 encode on supported platforms.

Go API References

Core structure and main function

SymbolFunction
Decoder / NewDecoderStreaming decoded MP3 to PCM.
DecodeFullReturns PCM, sample rate and channels at once.
Encoder / NewEncoderWrite PCM to MP3 stream.
WithQuality / WithBitrateConfigure encoder quality or bitrate.
EncodePCMStreamConvert the complete PCM input stream.

Encoder availability is subject to build target and native dependency; unsupported platforms return explicit errors and cannot silently generate spurious output.