Membrane.WAV.Serializer (Membrane WAV Plugin v0.2.0-alpha) View Source

Element responsible for raw audio serialization to WAV format.

Creates WAV header (its description can be found with Membrane.WAV.Parser) from received caps and puts it before audio samples. The element assumes that audio is in PCM format. File length and data length can be calculated only after processing all samples, so these values are invalid (always set to 0). Use Membrane.WAV.Postprocessing.fix_wav_header/1 module to fix them.

The element has one option - frames_per_buffer. User can specify number of frames sent in one buffer when demand unit on the output is :buffers. One frame contains bits per sample x number of channels bits.

Element options

Passed via struct Membrane.WAV.Serializer.t/0

  • frames_per_buffer

    pos_integer()

    Default value: 2048
    Assumed number of raw audio frames in each buffer. Used when converting demand from buffers into bytes.

Pads

:input

Availability:always
CapsMembrane.Caps.Audio.Raw
Demand unit:bytes
Direction:input
Mode:pull
Name:input

:output

Availability:always
Caps:any
Direction:output
Mode:pull
Name:output

Link to this section Summary

Types

t()

Struct containing options for Membrane.WAV.Serializer

Functions

Returns pads descriptions for Membrane.WAV.Serializer

Returns description of options available for this module

Link to this section Types

Specs

t() :: %Membrane.WAV.Serializer{frames_per_buffer: pos_integer()}

Struct containing options for Membrane.WAV.Serializer

Link to this section Functions

Specs

membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]

Returns pads descriptions for Membrane.WAV.Serializer

Specs

options() :: keyword()

Returns description of options available for this module