Membrane.AudioInterleaver (Membrane Audio Mix plugin v0.3.0) View Source

Element responsible for interleaving several mono audio streams into single interleaved stream. All input streams should be in the same raw audio format, defined by input_caps option.

Channels are interleaved in order given in order option - currently required, no default available.

Each input pad should be identified with your custom id (using via_in(Pad.ref(:input, your_example_id) )

Element options

Passed via struct Membrane.AudioInterleaver.t/0

  • input_caps

    Raw.t()

    Default value: nil
    The value defines a raw audio format of pads connected to the element. It should be the same for all the pads.

  • 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.

  • order

    [any()]

    Required
    Order in which channels should be interleaved

Pads

:input

Availability:on_request
CapsMembrane.Caps.Audio.Raw, restrictions:<br />&nbsp;&nbsp;channels: 1
Demand unit:bytes
Direction:input
Mode:pull
Name:input

Options:

  • offset

    Time.t()

    Default value: 0
    Offset of the input audio at the pad.

:output

Availability:always
CapsMembrane.Caps.Audio.Raw
Direction:output
Mode:pull
Name:output

Link to this section Summary

Types

Options for pad :input

t()

Struct containing options for Membrane.AudioInterleaver

Functions

Returns pads descriptions for Membrane.AudioInterleaver

Returns description of options available for this module

Link to this section Types

Specs

input_pad_opts_t() :: [{:offset, Time.t()}]

Options for pad :input

Specs

t() :: %Membrane.AudioInterleaver{
  frames_per_buffer: pos_integer(),
  input_caps: Membrane.Caps.Audio.Raw.t(),
  order: [any()]
}

Struct containing options for Membrane.AudioInterleaver

Link to this section Functions

Specs

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

Returns pads descriptions for Membrane.AudioInterleaver

Specs

options() :: keyword()

Returns description of options available for this module