RustyOpus.MP3 (rusty_opus v0.4.0)

Copy Markdown View Source

In-memory MPEG Layer III conversion backed by the pinned pure-Rust MP3 codec.

MP3 output accepts standard numeric bitrates in bits per second. :bitrate_mode is :vbr by default or :cbr; metadata such as ID3 tags is not preserved.

Summary

Functions

decode(blob)

@spec decode(binary()) :: {:ok, RustyOpus.PCM.t()} | {:error, RustyOpus.Error.t()}

encode(pcm, opts)

@spec encode(
  RustyOpus.PCM.t(),
  keyword()
) :: {:ok, binary()} | {:error, RustyOpus.Error.t()}

reencode(blob, opts)

@spec reencode(
  binary(),
  keyword()
) :: {:ok, binary()} | {:error, RustyOpus.Error.t()}