<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eq-Tech &#187; Networking</title>
	<atom:link href="http://equima.pfpfree.net/category/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://equima.pfpfree.net</link>
	<description>More techno ramble - but with a twist!</description>
	<lastBuildDate>Sat, 28 Aug 2010 01:43:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Sharing sound between Pulseaudio instances in Ubuntu Karmic 9.10</title>
		<link>http://equima.pfpfree.net/2009/sharing-sound-between-pulseaudio-instances-in-ubuntu-karmic-9-10/</link>
		<comments>http://equima.pfpfree.net/2009/sharing-sound-between-pulseaudio-instances-in-ubuntu-karmic-9-10/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 10:06:04 +0000</pubDate>
		<dc:creator>insanity</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[multicast]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[rtp]]></category>

		<guid isPermaLink="false">http://equima.pfpfree.net/?p=120</guid>
		<description><![CDATA[The goal of this post is to respond to a query about how to synchronize soundcards across several Ubuntu-based computers together using pulseaudio. I will present two methods, demonstrating the GUI tools that are available, before showing how to come up with the manually-edited files. In theory, at the end of this post you will [...]]]></description>
			<content:encoded><![CDATA[<p>The goal of this post is to respond to a query about how to synchronize soundcards across several Ubuntu-based computers together using pulseaudio.  I will present two methods, demonstrating the GUI tools that are available, before showing how to come up with the manually-edited files.  In theory, at the end of this post you will have multiple linux computers able to play sound from a single source using Pulseaudio&#8217;s Multicast/RTP abilities.</p>
<p>I must warn, the sound quality is VERY dependant on your network speeds and CPU loads at either end.  If you are running a lot of programs on either the server or the client, the sound will be erratic.  See the bugs on the pulseaudio website.  I was unable to get the sound to run very smoothly for any length of time on between two Ubuntu VM&#8217;s on pulseaudio version 0.9.19-0ubuntu4.  The specific bugs are:</p>
<ul>
<li><a href="http://www.pulseaudio.org/ticket/670">http://www.pulseaudio.org/ticket/670</a></li>
<li><a href="http://www.pulseaudio.org/ticket/477">http://www.pulseaudio.org/ticket/477</a></li>
</ul>
<p>Either way, it is a fun exercise in pulseaudio configuration.  In order to demonstrate this I have set up two Ubuntu VM&#8217;s using VirtualBox on a local network.</p>
<h1>Graphical Setup</h1>
<p>The first step is to install the tools we&#8217;re going to use to configure this.  Install PulseAudio Device Chooserm PulseAudio Volume Control and PulseAudio Preferences.  Select these items from the Ubuntu Software Centre.  You can easily reduce the list to these items by searching for pulseaudio in the search bar as shown in the following screenshot:</p>
<div id="attachment_121" class="wp-caption aligncenter" style="width: 520px"><a href="http://equima.pfpfree.net/wp-content/uploads/2009/11/Screenshot-Ubuntu-Software-Center-Pulseaudio.png"><img class="size-full wp-image-121 " title="Installing Pulseaudio Setup tools" src="http://equima.pfpfree.net/wp-content/uploads/2009/11/Screenshot-Ubuntu-Software-Center-Pulseaudio.png" alt="Screenshot of Ubuntu Software Center installing Pulseaudio" width="510" height="300" /></a><p class="wp-caption-text">Screenshot of Ubuntu Software Center installing Pulseaudio</p></div>
<p>Once this is installed, you can launch it by selecting it from Applications menu.</p>
<div id="attachment_122" class="wp-caption aligncenter" style="width: 499px"><a href="http://equima.pfpfree.net/wp-content/uploads/2009/11/Select-Pulseaudio-Dev-Chooser.png"><img class="size-full wp-image-122 " title="Open the Pulseaudio Device Chooser" src="http://equima.pfpfree.net/wp-content/uploads/2009/11/Select-Pulseaudio-Dev-Chooser.png" alt="Open the Pulseaudio Device Chooser" width="489" height="287" /></a><p class="wp-caption-text">Open the Pulseaudio Device Chooser</p></div>
<p>This will put an audio plug icon up near the clock. Left-click (or primary click) .  Select &#8220;Configure local Sound Server&#8221; and change to the Multicast/RTP tab in the Preferences window:</p>
<div id="attachment_123" class="wp-caption aligncenter" style="width: 464px"><a href="http://equima.pfpfree.net/wp-content/uploads/2009/11/Screenshot-PulseAudio-Preferences.png"><img class="size-full wp-image-123 " title="PulseAudio Preferences" src="http://equima.pfpfree.net/wp-content/uploads/2009/11/Screenshot-PulseAudio-Preferences.png" alt="PulseAudio Preferences" width="454" height="213" /></a><p class="wp-caption-text">PulseAudio Preferences</p></div>
<h2>Server Computer</h2>
<p>The first computer set-up will be the server.  This is the computer you will be controlling &amp; playing the sound from.  On this computer you will need to open up rhythmbox or your chosen audio program that supports pulseaudio output.  Totem or VLC also fit this prescription.</p>
<p>On the server computer you will want to &#8220;Enable Mutlicast/RTP sender&#8221;.  If you want to play the sound out this server computer&#8217;s speakers, select &#8220;Send audio from local speakers&#8221;.  If you want to be more specific about what is sent, I would recommend you select &#8220;Create separate audio device for Multicast/RTP&#8221;.  For my setup, I want to be able to send only music to the stream when I want it, so I am going to chose the second option.</p>
<h2>Client Computer(s)</h2>
<p>The client computers will all need to be set up with the &#8220;Enable Multicast/RTP receiver&#8221; option enabled.  Assuming the networks are working properly, you should immediately start hearing music on all the client computers!</p>
<h1>Manual Configuration</h1>
<p>If you don&#8217;t have the benefits of a running Xserver, or want to configure these settings to work on a headless machine, you will need to be manually configuring the pulseaudio config files.  The pulseaudio config files are stored in /etc/pulse/system.pa if you&#8217;re running in daemon mode, and /etc/pulse/default.pa if you&#8217;re running in a per user setup (this is the default method in Ubuntu).  I&#8217;m going to write this assuming you are using daemon-mode, so we will be editing /etc/pulse/system.pa.</p>
<h2>Server Computer</h2>
<p>To setup the server computer, you need to edit the configuration.  In a terminal or on a console with admin access type the following:</p>
<blockquote>
<pre>sudo nano /etc/pulse/system.pa</pre>
</blockquote>
<p>In this file, find and uncomment the lines that look like:</p>
<blockquote>
<pre>load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
load-module module-rtp-send source=rtp.monitor</pre>
</blockquote>
<p>(If these don&#8217;t exist, just add them to the end of the file)</p>
<p>Once this is done, restart the pulseaudio server by running:</p>
<blockquote>
<pre>sudo /etc/init.d/pulseaudio restart</pre>
</blockquote>
<h2>Client Computer(s)</h2>
<p>The client computer will be done by editing /etc/pulse/system.pa (alternatively, you can copy this file to ~/pulse/default.pa).  Edit this file by typing:</p>
<blockquote>
<pre>sudo nano /etc/pulse/system.pa</pre>
</blockquote>
<p>In this file, find and uncomment the lines that look like:</p>
<blockquote>
<pre>### Load the RTP reciever module (also configured via paprefs, see above)
#load-module module-rtp-recv</pre>
</blockquote>
<p>Again, if this doesn&#8217;t exist, just add them to the end of the file.</p>
<p>Once you&#8217;ve saved this, apply the changes the same way you did previously&#8230; by restarting pulseaudio:</p>
<blockquote>
<pre>sudo /etc/init.d/pulseaudio restart</pre>
</blockquote>
<p>Once again, assuming the network is behaving correctly, you should be hearing sound out both ends.</p>
<h1>Troubleshooting &amp; More Information</h1>
<p>Troubleshooting guides are well written on the pulseaudio site.  If you have any issues I would suggest reading the wonderful article at <a href="http://www.pulseaudio.org/wiki/HowToListenToTheRtpStream">http://www.pulseaudio.org/wiki/HowToListenToTheRtpStream</a>.  The key thing is to check that you can see the broadcast packets (see the tcpdump section in the article).</p>
<p>Another good tip is to start the pulseaudio server in non-daemon mode.  This will allow you to see and interact with the pulseaudio from the command line.  To do this, stop any existing pulseaudio servers with the following command:</p>
<blockquote>
<pre>sudo /etc/init.d/pulseaudio stop # in system or daemon mode or</pre>
<pre>pulseaudio -k # for single user mode</pre>
</blockquote>
<p>To start pulseaudio server, run the following:</p>
<blockquote>
<pre>sudo pulseaudio --system -Cv # in system or daemon mode or</pre>
<pre>pulseaudio -Cv # for single user mode</pre>
</blockquote>
<p>Take note of any errors you see when starting this.  Once the server is started, you can list the modules loaded by typing the following in the pulseaudio console:</p>
<blockquote>
<pre>list-modules</pre>
</blockquote>
<p>For more information on how to load modules see <a href="http://www.pulseaudio.org/wiki/Modules">http://www.pulseaudio.org/wiki/Modules</a>, and specifically <a href="http://www.pulseaudio.org/wiki/Modules#RTPSDPSAPTransport">http://www.pulseaudio.org/wiki/Modules#RTPSDPSAPTransport</a>.</p>
<p>More information about the commands that can be run in the pulseaudio console, see <a href="http://www.pulseaudio.org/wiki/CLI">http://www.pulseaudio.org/wiki/CLI</a></p>
]]></content:encoded>
			<wfw:commentRss>http://equima.pfpfree.net/2009/sharing-sound-between-pulseaudio-instances-in-ubuntu-karmic-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emotional gMail</title>
		<link>http://equima.pfpfree.net/2008/emotional-gmail/</link>
		<comments>http://equima.pfpfree.net/2008/emotional-gmail/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 05:40:24 +0000</pubDate>
		<dc:creator>sparky</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://equima.pfpfree.net/?p=65</guid>
		<description><![CDATA[Further to the discussion about gmail&#8217;s Beta-state, I recently noticed they&#8217;d incorporated a new button for mail. I suppose this is a clear example as to why it&#8217;s still in Beta! In other news, we apologise for the slightly quieter state of this site; two of us are currently in exam / assignment mode, and [...]]]></description>
			<content:encoded><![CDATA[<p>Further to the discussion about gmail&#8217;s Beta-state, I recently noticed they&#8217;d incorporated a new button for mail.</p>
<p><img class="size-full wp-image-66" title="gmail-emoticons" src="http://equima.pfpfree.net/wp-content/uploads/2008/10/gmail-emoticons.jpg" alt="Emoticons!!!" width="500" height="244" /></p>
<p>I suppose this is a clear example as to why it&#8217;s still in Beta! <img src='http://equima.pfpfree.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In other news, we apologise for the slightly quieter state of this site; two of us are currently in exam / assignment mode, and another of us is getting married; Look forward to some more posts in the coming weeks as we&#8217;re freed from the shackles of university!</p>
]]></content:encoded>
			<wfw:commentRss>http://equima.pfpfree.net/2008/emotional-gmail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
