gstaudio.stream_volume_mixin

Module for StreamVolume interface mixin

Templates 2

tmplStreamVolumeT()

This interface is implemented by elements that provide a stream volume. Examples for such elements are #volume and #playbin.

Applications can use this interface to get or set the current stream volume. For this the "volume" #GObject property can be used or the helper functions gstaudio.stream_volume.StreamVolume.setVolume and gstaudio.stream_volume.StreamVolume.getVolume. This volume is always a linear factor, i.e. 0.0 is muted 1.0 is 100%. For showing the volume in a GUI it might make sense to convert it to a different format by using gstaudio.stream_volume.StreamVolume.convertVolume. Volume sliders should usually use a cubic volume.

Separate from the volume the stream can also be muted by the "mute" #GObject property or gstaudio.stream_volume.StreamVolume.setMute and gstaudio.stream_volume.StreamVolume.getMute.

Elements that provide some kind of stream volume should implement the "volume" and "mute" #GObject properties and handle setting and getting of them properly. The volume property is defined to be a linear volume factor.

Functions
bool mute()
void mute(bool propval)
double volume()
void volume(double propval)
bool getMute()
double getVolume(gstaudio.types.StreamVolumeFormat format)
void setMute(bool mute)
void setVolume(gstaudio.types.StreamVolumeFormat format, double val)
tmplStreamVolumeGidBuilderT()

Fluent builder implementation template for gstaudio.stream_volume.StreamVolume

Functions
T mute(bool propval)
T volume(double propval)