Infer.Audio (Infer v0.1.0) View Source

Audio type matchers based on the magic number

Link to this section Summary

Functions

Takes the binary file contents as arguments. Returns true if it's a aac.

Takes the binary file contents as arguments. Returns true if it's a amr.

Takes the binary file contents as arguments. Returns true if it's a flac.

Takes the binary file contents as arguments. Returns true if it's a m4a.

Takes the binary file contents as arguments. Returns true if it's a midi.

Takes the binary file contents as arguments. Returns true if it's a mp3.

Takes the binary file contents as arguments. Returns true if it's a ogg.

Takes the binary file contents as arguments. Returns true if it's a wav.

Link to this section Functions

Specs

is_aac(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a aac.

Specs

is_amr(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a amr.

Specs

is_flac(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a flac.

Specs

is_m4a(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a m4a.

Specs

is_midi(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a midi.

Specs

is_mp3(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a mp3.

Examples

iex> binary = File.read!("test/audio/sample.mp3")
iex> Infer.Audio.is_mp3(binary)
true

Specs

is_ogg(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a ogg.

Specs

is_wav(binary()) :: boolean()

Takes the binary file contents as arguments. Returns true if it's a wav.