<?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>Planet Nectarius &#187; Neverwinter Nights</title>
	<atom:link href="http://nectarius.net/tag/neverwinter-nights/feed/" rel="self" type="application/rss+xml" />
	<link>http://nectarius.net</link>
	<description>Nectarines are tasty</description>
	<lastBuildDate>Thu, 12 Jan 2012 22:58:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Puzzle Pirates and NWN sound</title>
		<link>http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/</link>
		<comments>http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/#comments</comments>
		<pubDate>Wed, 22 Aug 2007 07:04:40 +0000</pubDate>
		<dc:creator>Tim</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Neverwinter Nights]]></category>
		<category><![CDATA[Puzzle Pirates]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/</guid>
		<description><![CDATA[Oh yeah&#8230; Puzzle pirates commonly has sound problems in linux because it uses the java sound library which isn&#8217;t very smart with ALSA. It tries to use the sound card directly, which in my setup (usb sound card) it seems to do nothing at all. I wouldn&#8217;t be surprised if it was spitting sound at [...]]]></description>
			<content:encoded><![CDATA[<p>Oh yeah&#8230;</p>
<p>Puzzle pirates commonly has sound problems in linux because it uses the java sound library which isn&#8217;t very smart with ALSA. It tries to use the sound card directly, which in my setup (usb sound card) it seems to do nothing at all. I wouldn&#8217;t be surprised if it was spitting sound at the onboard card though. This is fixed by wrapping the application in the <code>aoss</code> command, which tricks it into thinking it&#8217;s using the old OSS sound library, but really ALSA is handling it. Of course this assumes that ALSA knows what it&#8217;s doing, but I fixed that in my previous post. To use <code>aoss</code> simply append it to the start of the launch command in a desktop launcher, or run it from a terminal like so: aoss /path/yohoho</p>
<p>In Neverwinter Nights I had slightly different problem, it uses the SDL library, which also doesn&#8217;t seem to choose the card properly. Again I needed to force it with <code>aoss</code>. But I also had to add a weird environment variable to the launch script, which I somehow found by searching through nwn forums. The nwn script usually looks like this:<br />
<code>#!/bin/sh</p>
<p># This script runs Neverwinter Nights from the current directory</p>
<p>export SDL_MOUSE_RELATIVE=0<br />
export SDL_VIDEO_X11_DGAMOUSE=0</p>
<p># If you do not wish to use the SDL library included in the package, remove<br />
# ./lib from LD_LIBRARY_PATH<br />
export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH</p>
<p>./nwmain $@</code></p>
<p>I changed it to this:<br />
<code>#!/bin/sh</p>
<p>cd /GAMEINSTALLPATH/</p>
<p># This adds a variable to make sound  work properly. NWN doesn't work with<br />
# select() function in the SDL sound library properly.<br />
# I think this means it doesn't know how to choose which sound card to use in<br />
# some setups.<br />
export SDL_DSP_NOSELECT=1</p>
<p># This script runs Neverwinter Nights from the current directory</p>
<p>export SDL_MOUSE_RELATIVE=0<br />
export SDL_VIDEO_X11_DGAMOUSE=0</p>
<p># If you do not wish to use the SDL library included in the package, remove<br />
# ./lib from LD_LIBRARY_PATH<br />
export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH</p>
<p>./nwmain $@</code></p>
<p>The added path change allows you to run the script from a desktop or panel launcher in gnome, otherwise nwn thinks the current directory is the desktop. Obviously <code>/GAMEINSTALLPATH/</code> should be the path you installed nwn at.</p>
]]></content:encoded>
			<wfw:commentRss>http://nectarius.net/2007/08/22/puzzle-pirates-and-nwn-sound/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

