[pulseaudio-discuss] [PATCH] Added loopback module option (gtk3 version)
Tanu Kaskinen
tanuk at iki.fi
Wed May 23 09:01:37 UTC 2018
On Sun, 2018-05-13 at 10:42 +0200, archlinux at nicohood.de wrote:
> From: NicoHood <git at nicohood.de>
>
> ---
> src/paprefs.cc | 32 ++++++++++++++++++++++++++++++++
> src/paprefs.glade | 36 +++++++++++++++++++++++++++++++-----
> 2 files changed, 63 insertions(+), 5 deletions(-)
You need to provide a patch also for
org.freedesktop.pulseaudio.gschema.xml (which is in pulseaudio, not
paprefs).
> @@ -169,6 +174,9 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>
> combineSettings = Gio::Settings::create(MODULE_GROUP_SCHEMA,
> MODULE_GROUPS_PATH "/combine/");
>
> + loopbackSettings = Gio::Settings::create(MODULE_GROUP_SCHEMA,
> + MODULE_GROUPS_PATH "/loopback/");
I don't think the loopback settings object will be added to the schema
before PulseAudio 12.0 is released, so you'll have to deal with the
situation where the object doesn't exist. I'm not sure what's the best
way to do that. The create() function is not documented, so I don't
know what it does if the requested path doesn't exist. If it just
returns null and doesn't print any warnings, then you can simply check
if loopbackSettings is null in every place that references it (and grey
out the option in the UI).
If create() doesn't behave nicely with non-existing paths, then you
need to check if the path exists before you call create(). You can use
Gio::Settings::list_children() for that.
In order to test this, you'll need a new PulseAudio version. 11.99.1
contains the necessary stuff, but if Arch doesn't provide that version
and you don't want to install PulseAudio from source, you'll have to
wait for 12.0. You'll still have to modify the schema that is provided
by PulseAudio, though... It should be possible to avoid building
PulseAudio from source, if you just modify the installed schema xml and
then use glib-compile-schemas to apply the changes.
> <property name="position">0</property>
> </packing>
> </child>
> + <child>
> + <object class="GtkCheckButton" id="loopbackCheckButton">
> + <property name="label" translatable="yes">Add _loopback output device for routing audio from a source to a sink</property>
The terminology isn't quite right here. A loopback is not an "output
device". I suggest the following wording:
Add a _loopback connection from the default source to the default sink
--
Tanu
https://liberapay.com/tanuk
https://www.patreon.com/tanuk
More information about the pulseaudio-discuss
mailing list