# audiomixer

The audiomixer allows to mix several streams into one by adding the data. Mixed data is clamped to the min/max values of the data format.

Unlike the adder element audiomixer properly synchronises all input streams and also handles live inputs such as capture sources or RTP properly.

The audiomixer element can accept any sort of raw audio data, it will be converted to the target format if necessary, with the exception of the sample rate, which has to be identical to either what downstream expects, or the sample rate of the first configured pad. Use a capsfilter after the audiomixer element if you want to precisely control the format that comes out of the audiomixer, which supports changing the format of its output while playing.

If you want to control the manner in which incoming data gets converted, see the converter-config property, which will let you for example change the way in which channels may get remapped.

The input pads are from a GstPad subclass and have additional properties to mute each pad individually and set the volume:

- "mute": Whether to mute the pad or not (#gboolean)
- "volume": The volume of the pad, between 0.0 and 10.0 (#gdouble)

## Example launch line

     gst-launch-1.0 audiotestsrc freq=100 ! audiomixer name=mix ! audioconvert ! alsasink audiotestsrc freq=500 ! mix.

This pipeline produces two sine waves mixed together.

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstAggregator
                        ╰──GstAudioAggregator
                            ╰──GstAudioMixer

## Implemented interfaces

    GstChildProxy

## Factory details

Authors: – Sebastian Dröge

Classification: – `Generic/Audio`

Rank – none

Plugin – audiomixer

Package – GStreamer Base Plug-ins

## Pad Templates

### `sink_%u`

    audio/x-raw:
             format: { F64LE, F64BE, F32LE, F32BE, S32LE, S32BE, U32LE, U32BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, S16LE, S16BE, U16LE, U16BE, S8, U8 }
               rate: [ 1, 2147483647 ]
           channels: [ 1, 2147483647 ]
             layout: interleaved

Presence – request

Direction – sink

Object type – GstAudioMixerPad

### `src`

    audio/x-raw:
             format: { S32LE, U32LE, S16LE, U16LE, S8, U8, F32LE, F64LE }
               rate: [ 1, 2147483647 ]
           channels: [ 1, 2147483647 ]
             layout: interleaved

Presence – always

Direction – src

Object type – GstAudioAggregatorConvertPad

The results of the search are