Install Pulseaudio On Windows

This is a bit of a niche post, so if you’ve never heard of PulseAudio then carry on elsewhere :)

Code Revisions 5 Stars 12 Forks 2. WSL pulseaudio 9.0 build.md. Sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install ubuntu-desktop build-essential git automake checkinstall gcc-6 g-6 intltool libtool alsa-base alsa-utils alsa-tools libasound2 libasound2-plugins libx11-dev.

  • May 07, 2021 Download PulseAudio Distribution. Typically PulseAudio would be provided by your OS distribution. As PulseAudio forms part of what is typically preferred to as the plumbing layer of Linux userspace, it is a non-trivial job to integrate it fully to form a complete system.
  • They all say basically the same thing, install pulseaudio-1.1 in windows, install a modified version of pulseaudio in ubuntu, then any audio file played in ubuntu will direct it's output to the windows pulseaudio running in the background which will send the audio to the hardware. Pulseaudio for windows is not working for me.

If, like me, you’ve been looking at setting up a PulseAudio server on Windows, you’ve no doubt come across an old binary download for version 0.9.6, which is approaching the healthy age of four years as of this writing. PulseAudio’s development has been very intensive since that time, with a lot of new features released. Sadly though, that development came at the cost of Windows compatibility, which meant that no newer versions were available for Windows. Until now that is, as the PulseAudio community is working on full Windows compatibility for the imminent release of version 1.0. Full details of progress are available on the PulseAudio wiki, but in the meantime a full build has been made available as a zipped package (I’ve also mirrored it here, but keep an eye out for updated versions). If you want help setting it up, then read on.

The Basics

There is no installer, so unzip the files into a location of your choice. For this tutorial, I’m going to assume the files are in C:PulseAudio. Next, you’ll need to open a command prompt. Windows Vista and 7 users will need to open a prompt with Administrator access: to do this, find the command prompt in your start menu, right click it, and select “Run as administrator”. Click yes if asked. Windows XP users can just open a prompt without further nonsense. In the prompt, type the following and hit enter:cd C:PulseAudiobin We can now test the program is working by typing pulseaudio.exe -p 'C:PulseAudiolibpulsemodules' -nF 'C:PulseAudioetcpulsedefault.pa' (and press enter). I got a few warnings and errors at this stage (it is beta software after all), but I think it’s safe to assume that if it doesn’t crash, it’s working enough for our needs. Hit ctrl+C to return to the prompt.

The next step is to configure PulseAudio to listen to connections on the network, since I assume nearly all Windows users want PulseAudio to stream audio from a Linux/Unix/BSD system. For this step you’ll need a text editor which can handle unix line endings, which does not include Microsoft’s own Notepad. If you don’t have one, I recommend Notepad++ as it’s totally free. Open your editor (Vista and 7 users will need to open it as administrator), and open the file at C:PulseAudioetcpulsedefault.pa. Underneath the line that reads load-module module-null-sink enter a new line: load-module module-native-protocol-tcp listen=0.0.0.0 auth-anonymous=1 You can now save the file, and restart PulseAudio with the same command line used earlier, and you should be able to play sound on your Windows machine across the network!

There is a caveat: this allows any machine on the network to send audio to you. If you are not firewalled from the internet or you don’t consider your network secure, you must use a cookie file that PulseAudio generates for you. You can find it in your user profile: on Windows XP, it’s located in C:Documents and Settings<your username>.pulse-cookie. Vista and 7 users can find it at C:Users<your username>.pulse-cookie. Simply copy this file to the home directory of the user that is sending you sound on the remote machine. Often this will be your own home directory, but some daemons run their own (for example, MPD on Ubuntu requires the cookie to be in /var/lib/mpd). When you’ve done this, you can remove the “auth-anonymous=1” part from the line above.

Install

Update: There is one more step necessary which I wasn’t aware of previously. In this version, the default behaviour of the server is to exit after 20 seconds of no playback, which is obviously not something we want. Open your text editor (as administrator if necessary) and start editing the file at C:PulseAudioetcpulsedaemon.conf. At the end of the file, copy in the following: exit-idle-time = -1 This simply tells PulseAudio not to exit until we say so.

Setting up MPD

The reason I want PulseAudio on Windows is to use it with MPD, running on another machine on the network. This allows me to use the same music player when booting between Windows and Linux on my work PC, without needing two different interfaces or two copies of the same music library. MPD is surprisingly easy to get working across a network. On the machine running MPD, open the mpd.conf file with your favourite editor, and as root if necessary. On most distros the file is at /etc/mpd.conf. At the end, append the following: audio_output {
type 'pulse'
name 'Friendly Name'
server 'hostname'
}
replacing “Friendly Name” with the name of your choice, and “hostname” with the hostname or IP address of the machine running PulseAudio. Optionally, you can now comment out any old audio_output entries. Restart MPD. Lastly, use your client to specify which output to use. With MPC, this is specified as mpc enable X on the command line, where X is the number of your output (the number is based on the ordering of outputs in the mpd.conf file). In GMPC (which I use), you can switch outputs under the Server menu. Load up a track and hit play – you should now be hearing music in Windows.

PulseAudio as a Windows service

This step is optional, and a bit involved, but if you want PulseAudio to be a service that runs when Windows starts up, this is how to do it. You will need something called “Windows Server 2003 Resource Kit Tools”, which is made by Microsoft and can be downloaded for free from their website. We need only two programs from this pack – instsrv.exe and srvany.exe. Install the pack, and keep track of where it was installed. In my case this was C:Program Files (x86)Windows Resource KitsTools. Open a command prompt, as administrator if necessary (you can use the prompt from earlier if it’s still open). Use the cd command as demonstrated previously to navigate to where the tools were installed. Now run instsrv PulseAudio 'C:Program Files (x86)Windows Resource KitsToolssrvany.exe' If your tools were installed somewhere else, then adjust that path so that it points to where srvany.exe ended up. Hopefully you’ll get a little message proclaiming success. You will now need to open the registry editor, which you can do by typing regedit in your start menu’s run box. If you’ve not used regedit before, it’s a little daunting but I will hold your hand all the way through. The layout is similar to Windows Explorer: the left pane holds “keys” which behave a little like folders, and the right pane holds “values”. Use the left pane to navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesPulseAudio. In the right pane, right click in the empty space and select New, then Key. You’ll be able to enter a name for it now, so enter Parameters. Now navigate into the new Parameters key, right click in the right pane again and select New, then String Value. Give it the name “Application” (without the quotes). Press enter to save the name, and double click your new value. In the prompt that pops up, enter the full command you used earlier to start PulseAudio, so using the same example as above this would be C:PulseAudiobinpulseaudio.exe -p 'C:PulseAudiolibpulsemodules' -nF 'C:PulseAudioetcpulsedefault.pa' Click OK, and close regedit. Open Control Panel, head to Administrative Tools, and open the Services applet. If you scroll down you should see our PulseAudio service. Make sure you aren’t still running PulseAudio in a command prompt (ctrl+C to exit), then right click the service and select Start. If you don’t get any errors, then this has probably worked, but you can check by looking for pulseaudio.exe in Task Manager (Windows 7 users might need to click “Show processes from all users”). From now on, PulseAudio will start as soon as Windows boots, and be available to all users.

Useful links

See Full List On Parseq.co.uk

  • My heartfelt thanks go out to Maarten Bosmans and the other contributors working on Windows support. His announcement of the new version is available here.
  • Further MPD instructions can be found at the MPD wiki.
  • More information on srvany and registry editing on the Microsoft Website

Running PulseAudio in system mode is usually a bad idea. There are use cases however, where PulseAudio’s system mode is a great tool, e.g. for building a PulseAudio streaming target to stream audio from multiple clients to speakers.

First, install PulseAudio, avahi (a free implementation of zeroconf) to publish the service throughout the network and the corresponding PulseAudio module:

Since the use cases of PulseAudio in system mode are limited, distributions usually do not ship a systemd unit for it.

Install Pulseaudio Windows 10

For a list of available options, have a loot at the pulse-daemon manpage.

In Fedora, sound devices (/dev/snd/*) are usually owned by root:audio and since the pulse user who will run PulseAudio daemon later is not part of the audio group per default, it cannot access sound devices. Adding the pulse user to the audio group is simple though

To make PulseAudio available over the network, you have to add a bit of configuration to /etc/pulse/system.pa

For a list of available module options, consult the PulseAudio module dokumentation, especially module-native-protocol-tcp.
auth-anonymous in particular might be a questionable idea in larger environments. An IP based access control list (auth-ip-acl) or a cookie containing some random data that serves as a shared secret between server and clients (auth-cookie) could be a more feasible approach.

Next, enable and start the PulseAudio server as well as the avahi daemon

You should be able to see a new service being published through avahi on the client:

You could then go ahead and use paprefs on your client to make remote PulseAudio sound devices available locally:

Use paprefs to make remote sound devices available locally.

Finally, you might want to enable additional audio channels or change the channel mapping on the server:

Download – PulseAudio

Don’t forget to restart the PulseAudio server afterwards!

Pulseaudio Install

Resources:
https://elehack.net/writings/computing/audio-server

Comments are closed.