Membrane Caps: Audio.Raw v0.1.4 Membrane.Caps.Audio.Raw.Format View Source
This module defines formats used in Membrane.Caps.Audio.Raw.Caps
and some helpers to deal with them.
Link to this section Summary
Functions
Converts positive integer containing serialized format to atom
Converts 3-tuple format to an equivalent atom form
converts audio format to 32-bit unsigned integer consisting of (from oldest bit):
- first bit for type (int/float)
- then bit for encoding (unsigned/signed)
- then bit for endianity (little/big)
- then sequence of zeroes
- last 8 bits for size (in bits)
Converts format atom to an equivalent 3-tuple form
Link to this section Types
Link to this type
t()
View Source
t() :: :f64be | :f64le | :f32be | :f32le | :u32be | :s32be | :u32le | :s32le | :u24be | :s24be | :u24le | :s24le | :u16be | :s16be | :u16le | :s16le | :u8 | :s8
Link to this section Functions
Converts positive integer containing serialized format to atom.
expects serialized format
returns format atom (See t/0
)
Link to this function
from_tuple(arg)
View Source
from_tuple({sample_type_t(), sample_size_t(), endianness_t()}) :: t()
Converts 3-tuple format to an equivalent atom form
converts audio format to 32-bit unsigned integer consisting of (from oldest bit):
- first bit for type (int/float)
- then bit for encoding (unsigned/signed)
- then bit for endianity (little/big)
- then sequence of zeroes
- last 8 bits for size (in bits)
expects atom format
returns format encoded as integer
Link to this function
to_tuple(atom)
View Source
to_tuple(t()) :: {sample_type_t(), sample_size_t(), endianness_t()}
Converts format atom to an equivalent 3-tuple form