Parlora.AudioFormat (Parlora v0.1.0)

Copy Markdown View Source

Explicit pipeline encoding and byte timing for PCM16LE and G.711 μ-law.

Summary

Types

t()

@type t() :: %Parlora.AudioFormat{
  channels: pos_integer(),
  codec: :pcm | :pcmu,
  sample_format: :s16le | nil,
  sample_rate_hz: pos_integer()
}

Functions

aligned?(format, data)

@spec aligned?(term(), binary()) :: boolean()

bytes_for_ms(format, ms)

@spec bytes_for_ms(t(), non_neg_integer()) :: non_neg_integer()

duration_us(format, bytes)

@spec duration_us(t(), non_neg_integer()) :: non_neg_integer()

pcmu()

@spec pcmu() :: t()

sample_bytes(audio_format)

@spec sample_bytes(t()) :: pos_integer()

silence(format, ms)

@spec silence(t(), non_neg_integer()) :: binary()

supported?(format)

@spec supported?(term()) :: boolean()