Documentation
¶
Overview ¶
Package mp3 provides a pure-Go MP3 encoder used to compress completed call audio before it is streamed to broadcast aggregators (Broadcastify Calls, RdioScanner, OpenMHz, Icecast).
It wraps the fixed-point Shine encoder, so the daemon keeps its zero-CGO single-binary guarantee — no libmp3lame / libshine at build or runtime. Shine supports the MPEG-1, MPEG-2 and MPEG-2.5 sample-rate families, so 8 kHz digital-voice audio encodes directly with no resample stage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
Encode compresses mono 16-bit PCM sampled at sampleRate Hz into a complete MP3 byte stream. The input is treated as a single channel; callers with stereo audio must downmix first.
func EncodeWAVFile ¶
EncodeWAVFile reads a 16-bit PCM mono WAV file from path and returns the equivalent MP3 byte stream plus the source sample rate.
Types ¶
This section is empty.