Smooth realtime control of audio amplitude for individual audio tracks during playback

Nicolas Dufresne nicolas at ndufresne.ca
Tue May 17 13:05:01 UTC 2022


Le mardi 17 mai 2022 à 01:41 +0000, Joachim Gossmann via gstreamer-devel a
écrit :
> Hi -
> 
> I would like to implement a realtime audio mixer:
> 
> Stream multichannel audio with GStreamer but then allow the receiver/file-
> player to control the playback volume of individual tracks in realtime,
> ideally minimizing latency/response time, but most of all: without
> artifacts/clicks.
> 
> I seem to be unable to achieve realtime interactive volume control without
> step artifacts (*)
>  
> Is there a possibility within the GStreamer framework, and if not: How do I
> get the audio out of GStreamer into another accessible framework (on iOS in my
> case, or alternatively: Unity).

Smooth volume control is possible through the GstControlBinding helpers. An
example can be found here:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gstreamer/tests/examples/controller/audio-example.c
I personally never used that live, but it should be possible. Though as for the
latency, unless you define low latency as something lower then 100m, then you
aren't using the right framework. For really low latency response of a user
volume control, you are better to interact with the audio deamon of your OS.

Nicolas

> 
> 
> Cheers, j
> 
> 
> 
> 
> ((*) I am currently using instances of GstTimedValueControlSource,
> GstControlSource on the 'Volume"-field of audiomixer element, scheduling
> gst_timed_value_control_source_set with a time elapsed since the stream/file-
> playback was started.)



More information about the gstreamer-devel mailing list