View Source Membrane.AudioInterleaver (Membrane Audio Mix plugin v0.16.3)
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_stream_format 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_stream_formatRawAudio.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_bufferpos_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
Accepted formats:
%RawAudio{channels: 1}Membrane.RemoteStream| Direction: | :input |
| Availability: | :on_request |
| Flow control: | :manual |
| Demand unit: | :bytes |
Pad options:
offsetTime.t()Default value:
0
Offset of the input audio at the pad.
:output
Accepted formats:
RawAudio| Direction: | :output |
| Availability: | :always |
| Flow control: | :manual |
| Demand unit: | nil |
Summary
Types
@type input_pad_opts() :: [{:offset, Time.t()}]
Options for pad :input
@type t() :: %Membrane.AudioInterleaver{ frames_per_buffer: pos_integer(), input_stream_format: Membrane.RawAudio.t(), order: [any()] }
Struct containing options for Membrane.AudioInterleaver
Functions
@spec options() :: keyword()
Returns description of options available for this module