Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Pulseaudio

Bignaux Ronan edited this page Mar 25, 2016 · 5 revisions

If you are using openal with pulseaudio support, you can benefit a few useful feature of pulseaudio to improve you call experience. Put all your tips here!

Make sure openal uses PA backend. I dont find a way to know that trough openal API or openal-info (?) Even the default order of choice seems to differ between version... And you can't fix it per app (?!)

So you should config it via openal ... configuration file! echo "drivers=pulse" > ~/.alsoftrc or globally in /etc/openal/alsoft.conf Hope this works for you...

First step with PulseAudio :

First, you can list already loaded modules : $ pactl list short modules

Noise and echo cancellation : module-echo-cancel

see #1655

$ pactl load-module module-echo-cancel aec_method=webrtc 26

$ pactl unload-module 26

more informations :

PulseAudio ducking

see #257

WONT WORK because phonon deprecated shadok machine! openal seems to be very limited. Even if i set media.role in the code and it seems ok for pulseaudio, it doesnt work. Anyway, without the capability of handle differently notification sound and call audio, it won't help.

<KittyCat> and unfortunately, openal soft has to force the pulseaudio media role to default/empty because Qt/Phonon tries to globally set it such that it hides the streams in pavucontrol

<KittyCat> pa_proplist_set(prop_filter, PA_PROP_MEDIA_ROLE, NULL, 0);  I set it there, and prop_filter gets passed to pa_stream_new_with_proplist for the playback stream

<KittyCat> that overrides the env var Phonon sets

pactl load-module module-role-ducking trigger_roles=phone ducking_roles=music,video volume=0

PULSE_PROP='media.role=phone' qtox

Idea of light integration :

#if defined (Q_OS_LINUX)
    // set a few environment variable to improve pulseaudio integration.
    // TODO : QT backend and PA only.
    // see : https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/
    setenv("PULSE_PROP_application.name", "qTox", 1); // not work.
    setenv("PULSE_PROP_media.role", "phone", 1); // TODO : add option at least in ini file.
    setenv("PULSE_PROP_application.icon_name", "qtox", 1);
#endif