FormatParser.Audio (format_parser v2.6.0)
An Audio struct and functions.
The Audio struct contains the fields format, sample_rate_hz, num_audio_channels, intrinsics and nature.
Summary
Functions
Parses an audio file or result.
Types
Functions
Parses an audio file or result.
- If given a tuple
{:error, file}wherefileis a binary, attempts to parse the audio file. - If given a binary
file, attempts to parse the audio file. - For any other input, returns the input as-is.
Examples
iex> parse({:error, "audio.mp3"}) # parsed audio result
iex> parse("audio.mp3") # parsed audio result
iex> parse(:ok) :ok