My problem is quite simple but I have been unable to find a satisfying solution.

Basically, I want my Raspberry Pi to be connected to my stereo and then play any audio output from my computer via wifi to the PI.

Is there any way to do this easily, without having to use special players? I.e. Is there anyway for the PC to just recognise the Pi as "speakers"?'

I would like to hear every sound on my PC on the stereo, ie. Gaming, music, system sounds, notifications, youtube videos etc.

Thanks very much!

7 Answers 7


If you are running Linux on your PC then this is perfectly doable, as long as you install and properly configure PulseAudio on both, your Raspberry Pi and your Linux PC.

If your PC is running Windows... Skip to the end of the post (which I have just updated).

Another option would be to use PulseAudio as an AirPlay receiver/client, but as far as I know, this is not possible.

But, if you are using Linux, then read on:

Note #1: PulseAudio over WiFi will work flawlessly on some routers but will fail on others.

Note #2: The following instructions are from a conversation several Raspberry Pi users (including myself) had on this very topic.

1) Install PulseAudio on your Raspberry Pi

sudo apt-get install pulseaudio pulseaudio-module-zeroconf avahi-daemon

2) Make sure PulseAudio starts automatically:

sudo nano /etc/default/pulseaudio

Look for the PULSEAUDIO_SYSTEM_START entry and change it to 1 so that looks like PULSEAUDIO_SYSTEM_START=1

3) Configure PulseAudio to work over the network:

sudo nano /etc/pulse/system.pa

Add the following lines:

load-module module-native-protocol-tcp auth-ip-acl=;

load-module module-zeroconf-publish

4) Reboot your Raspberry Pi:

sudo reboot

5) Now, on your Linux PC, install paprefs. If your Linux distro is based on Debian (such as Ubuntu, Mint, etc...) you can use this command:

sudo apt-get install paprefs

6) Run paprefs and under Network Access enable Make discoverable PulseAudio network sound devices available locally

7) Under Network Server enable Enable network access to local sound devices and tick both options (This is probably not necessary, unless you also want to use your Linux box as a server/sink)

8) Under Multicas/RTP enable both options

9) Check your available output devices (use your Linux distro Audio/Mixer Application). Your Raspberry Pi will (should) appear listed; select it and everything that's played on your Linux box will be redirected to the Raspberry Pi.

If your Raspberry Pi is still unavailable, try restarting your Linux PC.

UPDATE: Sending all audio from Windows to the Raspberry Pi

You will still need to follow the previous instructions to install and configure PulseAudio on your Raspberry Pi.

Now, this is what you will need to do for Windows:

1) Download the latest version of LineInCode

2) Unzip the downloaded file

2) Download PuTTY's Plink and place the plink.exe file in the same folder where you extracted LineInCode

3) Open Notepad and paste the following code:

linco.exe -B 16 -C 2 -R 44100 | plink -l pi -pw raspberry "cat - | pacat --server --playback"

Of course, change the IP address (, user name (pi) and password (raspberry) to match your setup.

4) Save the file as audio2rpi.bat in the same folder where you extracted LineInCode

Now, whenever you want to stream your Windows' PC audio to your Raspberry Pi simply double click on the audio2rpi.bat file.

Credit for these instructions: http://ubuntuforums.org/showthread.php?t=1121603

  • Thanks- I shall give that a go! can I use pulseaudio to stream from a smartphone too? Thanks
    – Jerome
    Commented Nov 16, 2013 at 10:56
  • @Jerome That should be another question you ask on this website.
    – syb0rg
    Commented Nov 16, 2013 at 16:52
  • What OS are you running on your Pi? I am running a fresh install of Raspbmc and following these instructions appears to have bricked the device. Good thing a reformat is so easy...
    – gillonba
    Commented Nov 25, 2013 at 4:58
  • 1
    @Bennypr0fane it appears that newer installations of PulseAudio do not require any changes to have it start automatically. You can check if it is already running using ps aux | grep pulse
    – xfx
    Commented Oct 28, 2021 at 23:17
  • 1
    @xfx It wasn't already running, but I created a systemd service unit to make PA start automatically: forums.raspberrypi.com/viewtopic.php?t=156120#p1019323 That made it work for me! Commented Nov 4, 2021 at 0:11

I wrote a little blog entry about how I got this working with PulseAudio on the PC and Raspbmc on the Raspberry Pi - using DLNA/UPnP streaming. It's here: http://westmarch.sjsoft.com/2014/04/streaming-audio-linux-to-raspbmc/. Hope that helps. There is a little lag while XBMC buffers - so this probably won't be great for gaming or anything, but it works nicely for music.

It's quite a long set of instructions - hence the link here, but here's a summary of the option that worked for me, using DLNA/UPnP:

  • apt-get install rygel
  • Open PulseAudio Preferences and under Network Server tick Make local sound devices available as DLNA/UPnP Media Server and Create separate audio device for DLNA/UPnP streaming
  • Edit Rygel's config in /etc/rygel.conf or $HOME/.config/rygel.conf, and configure it to publish using GstLaunch (see config below)
  • Go to your XBMC File Manager, browse for a new source, select UPnP Devices, and you should see Gst Launch as an option
  • Then you should be able to tell XBMC to play audio from that stream

Here's the config for Rygel to use GstLaunch:

mypulseaudiosink-title=Audio on @HOSTNAME@
mypulseaudiosink-launch=pulsesrc device=upnp.monitor ! flacenc
  • Could you include a simplified set of instructions from your blog post in case something happens to it in the future?
    – Fred
    Commented Apr 14, 2014 at 17:21

Wanted to do this myself from Windows7 -> RaspberryPi (OpenElec) and stumbled over your question. After quite some research I still did not find a satisfying solution for OpenElec but had enough info to come up with one that is very simple and really works with high quality and only about ~1sec delay!

You need:

  1. VLC Media Player (I used v2.1.3 Rincewind on my Win7 x64)
  2. A soundcard that provides a "Stereo Mix" recording device (I was fortunate enough to have one on-board)
  3. A Raspberry Pi (I use OpenElec 4.0.5, although it should work for XBMC in general)

Note: If you do not have a soundcard that supports this you could try to use VAC (http://www.virtualaudiocable.net/), although I am tellin' you it did not work properly for me, poor audio quality and buffer problems all the way...but maybe it's just me.

Step 1)

Create a batch file which starts a VLC http streaming service in background and captures audio from the "Stereo Mix" recording device:

@echo off

set vlc="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
start "" %vlc% --qt-start-minimized dshow:// :dshow-vdev=none :dshow-adev="Stereo Mix (Realtek High Defini" :live-caching=10 :sout=#transcode{vcodec=none,acodec=vorb,ab=500,channels=2,samplerate=44100}:http{dst=:8080/audiostream.ogg} :sout-keep


  1. You might have to change the recording device if yours has a different name, I used Audacity (http://audacity.sourceforge.net/) to check the names of my capture devices since I already had it installed
  2. Yes, the audio bitrate is very high (maximum for Vorbis), but the higher the bitrate the quicker the buffer is filled and hence the shorter the delay :-) (you cannot change the buffer size explicity for music on XBMC, I use 5MB buffer on mine in general)
  3. I tried FLAC, MP3 and even WAV and apart from the fact that only MP3 and Vorbis worked at all with my Pi, I had the quickest loading time on the Pi (basically instantly) and the least delay with Vorbis

Step 2)

Navigate to


and create a .strm file with a name of your choice there (I called mine VLC.strm) which contains the plain link to your VLC stream: (change IP to IP of your PC :p)

Step 3)

You can now either set the audio device which is captured by "Stereo Mix" to default in the windows sound settings or open a player like VLC and manually use the non-default device to play music on your RaspberryPi:

Open your VLC (in addition to the one minimized in your tray which is streaming your "Stereo Mix") and perform the following steps:

  1. Tools -> Preferences
  2. Audio
  3. Output module: "WaveOut audio output"
  4. Device: - your (analog) device which is captured by the "Stereo Mix" recording device-
  5. Save
  6. Restart VLC
  7. Play Music

Step 4)

On your RaspberryPi:

  1. In XBMC navigate to Music -> Playlists
  2. Select VLC.strm (or whatever you called it)


If you have troubles getting your "Stereo Mix" to work or capture, play around in Windows first by e.g. recording it with Audacity and trying some forum suggestions like:

this one:


or this one:


Right, enough typing for today, hope this was helpful to someone!

BR, Deads


The "LineInCode"-Solution described here works - but the sound is terrible over wifi. The VLC-Solution provided above works too - but it need a lot of clicking. I combined both in a batch-file which would start VLC as a streamer on my PC and mpg123 as a "listner" on the PI. It works like a charm for me. You need to have Plik in the same folder (we use it as ssh-client). I use this script from today on to listen to mp3s on my laptop, while the soundoutput is the pi:

            REM This is fischteich's start_sound.bat v 0.3
            @echo off

            set vlc="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"
            set ssh-login=YOURLOGIN
            set ssh-pw=YOURPW
            set this-machine-ip=192.168.XXX.XXX
            set pi-ip=192.168.XXX.XXX
            set use-port=5001

            set start-string= --sout-keep --sout=#transcode{vcodec=none,acodec=mp3,ab=192,channels=2,samplerate=44100}:http{mux=mp3,dst=:%use-port%/}

            REM Start VLC ready for files to play
            @start "vlc" %vlc% %start-string%
            REM Start playback via mpg123 on the Pi!
            plink %pi-ip% -l %ssh-login% -pw %ssh-pw% "mpg123 http://%this-machine-ip%:%use-port%"

One way to achieve this would be to install the Volumio OS on the Raspberry PI (https://volumio.org) follow instructions given there. This distribution includes an ShairPort receiver which allows Apple devices to stream audio to it. Alternatively I guess you could just install Shairport on the distribution of your choice.

On your Windows PC install tuneblade (http://tuneblade.com) the free version of which allows you to stream your computer's audio to the ShairPort on your raspberry pi. It also works well with vlc to eliminate the audio delay when viewing videos etc.

This works for me — I hope it might work for you too.

  • Welcome to Raspberry Pi Stack Exchange! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Commented Feb 25, 2014 at 16:37
  • Tuneblade also works with Pi MusicBox
    – jzahedieh
    Commented Nov 17, 2014 at 23:41
  • worked like a charm on my dietpi rpi2 / win11 setup
    – d.popov
    Commented Aug 15, 2022 at 12:32

As far as I know there is no solution(yet). There is a standard/technology named AVB but its support planned for 802.11 is limited to time synchronization.


Have you tried simple bluetooth audio streaming using an A2DP adapter connected to your stereo? Using a Raspberry Pi to do that seems overkill, although I will admit to building an A2DP bluetooth audio streaming device with a Raspberry Pi and a cheap USB bluetooth adapter.

  • It's great that you've built a Raspi that can stream A2DP, but your answer doesn't help me to the same, so this answer is not an answer.
    – Mark Booth
    Commented Aug 23, 2015 at 0:39
  • No pi neeeded. Pair Your PC with a Bluetooth receiver, and send soound straight from your PC to your sterol. The Bluetooth receiver should show up asa sound output on your pc. Commented Apr 11, 2017 at 20:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.