View Source Membrane.Audiometer.Peakmeter (Membrane Audiometer plugin v0.9.0)

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}} - where measurement is a Membrane.Audiometer.Peakmeter.Notification.Measurement struct containing computed audio levels. See its documentation for more details about the actual value format.

See options/0 for available options.

element-options

Element options

Passed via struct Membrane.Audiometer.Peakmeter.t/0

  • interval

    any

    Default value: 50000000
    How often peakmeter should emit messages containing sound level (in Membrane.Time units).

pads

Pads

input

:input

Availability :always
Caps Membrane.RawAudio
Demand mode :auto
Demand unit :buffers
Direction :input
Mode :pull
Name :input

output

:output

Availability :always
Caps Membrane.RawAudio
Demand mode :auto
Demand unit :buffers
Direction :output
Mode :pull
Name :output

Link to this section Summary

Types

t()

Struct containing options for Membrane.Audiometer.Peakmeter

Functions

Returns pads descriptions for Membrane.Audiometer.Peakmeter

Returns description of options available for this module

Link to this section Types

@type amplitude_t() :: [number() | :infinity | :clip]
@type t() :: %Membrane.Audiometer.Peakmeter{interval: any()}

Struct containing options for Membrane.Audiometer.Peakmeter

Link to this section Functions

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

Returns pads descriptions for Membrane.Audiometer.Peakmeter

@spec options() :: keyword()

Returns description of options available for this module