<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Quick help with audio</title>
		<link>http://www.allegro.cc/forums/view/611930</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 27 Jan 2013 09:40:48 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I&#39;m making a pong game where a <b>boop</b> sound is played whenever the ball collides with the paddle.  For some reason, I get an error when playing the sound.
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/ALLEGRO_SAMPLE"><span class="a">ALLEGRO_SAMPLE</span></a><span class="k3">*</span>boopSound<span class="k3">=</span><a href="http://www.allegro.cc/manual/al_load_sample"><span class="a">al_load_sample</span></a><span class="k2">(</span><span class="s">"boop.wav"</span><span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/ALLEGRO_PLAYMODE"><span class="a">ALLEGRO_PLAYMODE</span></a> noLoop<span class="k3">=</span>ALLEGRO_PLAYMODE_ONCE<span class="k2">;</span>
<a href="http://www.allegro.cc/manual/ALLEGRO_SAMPLE_ID"><span class="a">ALLEGRO_SAMPLE_ID</span></a> sampleID<span class="k2">;</span>
...
<a href="http://www.allegro.cc/manual/al_play_sample"><span class="a">al_play_sample</span></a><span class="k2">(</span>boopSound,<span class="n">255</span>,<span class="n">127</span>,<span class="n">1200</span>,noLoop, <span class="k3">&amp;</span>sampleID<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
any thoughts on why this isn&#39;t working?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jason Marmon)</author>
		<pubDate>Sun, 27 Jan 2013 06:39:00 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Check that boopSound isn&#39;t NULL. Check if you initialized the acodec addon.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Trent Gamblin)</author>
		<pubDate>Sun, 27 Jan 2013 07:23:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks for the reply.  I didn&#39;t initialized the acodec addon.  However, now that I&#39;ve added &quot;al_init_acodec_addon()&quot;, no sound plays when the program runs (I did check to see if boopSound was null).
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jason Marmon)</author>
		<pubDate>Sun, 27 Jan 2013 08:49:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Your parameters are wrong. They should be 1.0, 0.0, 1.0. Check the docs.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sun, 27 Jan 2013 09:38:01 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Figured out the problem - I was looking at an outdated guide.  Here&#39;s the new code:<br />al_play_sample(boopSound,1.0,ALLEGRO_AUDIO_PAN_NONE,1.0,noLoop, &amp;sampleID);<br />EDIT: I see now Matthew responded with the fix; a belated thanks for your help Matthew <img src="http://www.allegro.cc/forums/smileys/smiley.gif" alt=":)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Jason Marmon)</author>
		<pubDate>Sun, 27 Jan 2013 09:40:48 +0000</pubDate>
	</item>
</rss>
