13.2. The Mixer interface

The mixer interface provides a uniform way to control the volume on a hardware (or software) mixer. The interface is primarily intended to be implemented by elements for audio inputs and outputs that talk directly to the hardware (e.g. OSS or ALSA plugins).

Using this interface, it is possible to control a list of tracks (such as Line-in, Microphone, etc.) from a mixer element. They can be muted, their volume can be changed and, for input tracks, their record flag can be set as well.

Example plugins implementing this interface include the OSS elements (osssrc, osssink, ossmixer) and the ALSA plugins (alsasrc, alsasink and alsamixer).

You should not use this interface for volume control in a playback application. Either use a volume element or use playbin's "volume" property, or use the audiosink's "volume" property (if it has one).

Note

In order for the GstMixer interface to be usable, the element implementing it needs to be in the right state, so that the underlying mixer device is open. This usually means the element needs to be at least in GST_STATE_READY before you can use this interface. You will get confusing warnings if the element is not in the right state when the interface is used.