[Spice-devel] [PATCH] audio: use GstVolume to have volume control.
Victor Toso
victortoso at redhat.com
Wed Feb 4 07:22:26 PST 2015
Hi,
This is about volume control with spice-gtk using gstreamer-1.0.
In windows client with gstreamer-1.0 it is possible to change the volume
of the playback audio but not of the record audio as directsoundsrc doesn't
implement volume control.
IDirectSoundCapture interface doesn't have volume control API so it is necessary
to use the mixer api [0] to have it in directsoundsrc.
[0] https://msdn.microsoft.com/en-us/library/ms932053.aspx
The #gstreamer folks recomended to use/work with the sink and src element based in
the wasapi (Windows Audio Session API) (-bad) that it was introduced in Windows Vista.
Both wasapi sink and src doesn't implement volume control and it wouldn't work with
Windows XP.
Also, the #gstreamer folks said that we could easily have volume control with the
volume element [1] which is true. The following patch includes the volume in the
pipeline and we can use it to control the volume of the pipeline (tested with
Fedora, Windows XP and Windows 7 as client/guest).
[1] http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-volume.html
The main problem is that using the volume element doesn't change the application's volume
in the client. So, if the client's application has 30% of volume it would stay 30% in the
client.
I would like to know if the following patch is acceptable or should I try to have a
patch in directsoundsrc using the mixer api is a better approach.
More information about the Spice-devel
mailing list