Membrane.AudioMixerBin (Membrane Audio Mix plugin v0.5.0) View Source
Bin element distributing a mixing job between multiple Membrane.AudioMixer
elements.
A tree of AudioMixers is created according to max_inputs_per_node
parameter:
- if number of input tracks is smaller than
max_inputs_per_node
, only one AudioMixer element is created for the entire job - if there are more input tracks than
max_inputs_per_node
, there are created enough mixers so that each mixer has at mostmax_inputs_per_node
inputs - outputs from those mixers are then mixed again following the same rules - another level of mixers is created having enough mixers so that each mixer on this level has at mostmax_inputs_per_node
inputs (those are now the outputs of the previous level mixers). Levels are created until only one mixer in the level is needed - output from this mixer is the final mixed track.
Bin allows for specyfiyng options for Membrane.AudioMixer
, which are applied for all AudioMixers.
Recommended to use in case of mixing jobs with many inputs.
Bin options
Passed via struct Membrane.AudioMixerBin.t/0
max_inputs_per_node
any
Default value:
10
The maximum number of inputs to a single mixer in the mixers tree. Must be at least 2.mixer_options
AudioMixer.t()
Default value:
%Membrane.AudioMixer{caps: nil, frames_per_buffer: 2048, prevent_clipping: true}
The options that would be passed to each created AudioMixer.
Pads
:input
Availability | :on_request |
Caps | Membrane.Caps.Audio.Raw , restrictions:<br /> format: one_of([:s8, :s16le, :s16be, :s24le, :s24be, :s32le, :s32be]) |
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 |
Caps | Membrane.Caps.Audio.Raw |
Demand unit | :bytes |
Direction | :output |
Mode | :pull |
Name | :output |
Link to this section Summary
Functions
Returns pads descriptions for Membrane.AudioMixerBin
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.AudioMixerBin{ max_inputs_per_node: any(), mixer_options: Membrane.AudioMixer.t() }
Struct containing options for Membrane.AudioMixerBin
Link to this section Functions
Specs
membrane_pads() :: [{Membrane.Pad.name_t(), Membrane.Pad.description_t()}]
Returns pads descriptions for Membrane.AudioMixerBin
Specs
options() :: keyword()
Returns description of options available for this module