This element computes peaks in each channel of the given signal at regular time intervals, regardless if it receives data or not.
It uses erlang's :timer.send_interval/2 which might not provide
perfect accuracy.
It accepts audio samples in any format supported by Membrane.RawAudio
module.
It will periodically emit notifications, of the following format:
{:audiometer, :underrun}- if there were not enough data to compute audio level within given interval,{:audiometer, {:measurement, measurement}}- wheremeasurementis aMembrane.Audiometer.Peakmeter.Notification.Measurementstruct containing computed audio levels. See its documentation for more details about the actual value format.
See options/0 for available options.
Element options
Passed via struct Membrane.Audiometer.Peakmeter.t/0
intervalMembrane.Time.t()Default value:
50 |> Membrane.Time.milliseconds()
How often peakmeter should emit messages containing sound level (in Membrane.Time units).
Pads
:input
Accepted formats:
RawAudio| Direction: | :input |
| Availability: | :always |
| Flow control: | :auto |
:output
Accepted formats:
RawAudio| Direction: | :output |
| Availability: | :always |
| Flow control: | :auto |
Summary
Types
@type amplitude_t() :: [number() | :infinity | :clip]
@type t() :: %Membrane.Audiometer.Peakmeter{interval: Membrane.Time.t()}
Struct containing options for Membrane.Audiometer.Peakmeter
Functions
@spec options() :: keyword()
Returns description of options available for this module