PulseAudio: Difference between revisions

imported>Haizaar
No edit summary
imported>Cluxter
Add sections about loading modules and about Bauer stereophonic-to-binaural DSP library (bs2b)
Line 15: Line 15:
</syntaxHighlight>
</syntaxHighlight>


==Explicit PulseAudio support in applications==
== Explicit PulseAudio support in applications ==
Normally, the system-wide ALSA configuration (<tt>/etc/asound.conf</tt>) redirects the audio of applications which use the ALSA API through PulseAudio. For this reason, most applications do not need to be PulseAudio-aware. Some NixOS packages can be built with explicit PulseAudio support which is disabled by default. This support can be enabled in all applicable packages by setting:
Normally, the system-wide ALSA configuration (<tt>/etc/asound.conf</tt>) redirects the audio of applications which use the ALSA API through PulseAudio. For this reason, most applications do not need to be PulseAudio-aware. Some NixOS packages can be built with explicit PulseAudio support which is disabled by default. This support can be enabled in all applicable packages by setting:


<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
nixpkgs.config.pulseaudio = true;
nixpkgs.config.pulseaudio = true;
</syntaxHighlight>
== Enabling modules ==
Modules can be loaded manually:
<syntaxHighlight lang="sh">
pactl load-module module-combine-sink
</syntaxHighlight>
Or automatically:
<syntaxHighlight lang="nix">
hardware.pulseaudio.extraConfig = "load-module module-combine-sink";
</syntaxHighlight>
</syntaxHighlight>


Line 36: Line 47:
$ nix-shell -p python27Full python27Packages.pyqt4 python27Packages.dbus-python --command qpaeq
$ nix-shell -p python27Full python27Packages.pyqt4 python27Packages.dbus-python --command qpaeq
</syntaxHighlight>
</syntaxHighlight>
== Using Bauer stereophonic-to-binaural DSP library ==
This module re-creates on a headset what you would hear in real-life, improving sound quality and decreasing brain fatigue.
See the description of the project for more details: https://bs2b.sourceforge.net/
The nix package to use is: <code>libbs2b</code>
<b>FIXME</b>: getting an error while running:
<syntaxHighlight lang=console>
$ pactl load-module module-ladspa-sink sink_name=binaural master=bluez_sink.AA_BB_CC_DD_EE_FF.a2dp_sink plugin=bs2b label=bs2b control=700,4.5
</syntaxHighlight>


== Troubleshooting ==
== Troubleshooting ==