<?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>Logic High Blog &#187; develoment</title>
	<atom:link href="http://blog.logichigh.com/tag/develoment/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.logichigh.com</link>
	<description>Logic High Software Blog</description>
	<lastBuildDate>Sat, 25 Jun 2011 00:39:31 +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>Play a short sound in your iPhone application the RIGHT WAY</title>
		<link>http://blog.logichigh.com/2009/02/14/play-a-short-sound-in-your-iphone-application-the-right-way/</link>
		<comments>http://blog.logichigh.com/2009/02/14/play-a-short-sound-in-your-iphone-application-the-right-way/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 21:38:17 +0000</pubDate>
		<dc:creator>BadPirate</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[aif]]></category>
		<category><![CDATA[AudioServices]]></category>
		<category><![CDATA[AudioServicesCreateSystemSoundID]]></category>
		<category><![CDATA[AudioServicesPlaySystemSound]]></category>
		<category><![CDATA[develoment]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[SystemSoundID]]></category>
		<category><![CDATA[wav]]></category>

		<guid isPermaLink="false">http://blog.logichigh.com/?p=132</guid>
		<description><![CDATA[There are LOTS of answers to this question out there on the internet, many of them old and no longer applicable.  LOTS of them use CF instead of NS libraries and many of them are LEAKY!  So after some research, and some help from the guys at #iphonedev (Thanks august, millenomi, sgtblue52) I think I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.logichigh.com%2F2009%2F02%2F14%2Fplay-a-short-sound-in-your-iphone-application-the-right-way%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.logichigh.com%2F2009%2F02%2F14%2Fplay-a-short-sound-in-your-iphone-application-the-right-way%2F&amp;source=badpirate&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There are LOTS of answers to this question out there on the internet, many of them old and no longer applicable.  LOTS of them use CF instead of NS libraries and many of them are LEAKY!  So after some research, and some help from the guys at #iphonedev (Thanks august, millenomi, sgtblue52) I think I finally landed on the right way to do it.</p>
<p>Note 1:  Works for AIF or WAV files, make sure they are properly added to your project.</p>
<p>Note 2:  Retain the SystemSoundID as an instance if you plan on using it multiple times</p>
<p>Note 3: In my example, I added the file &#8220;bell.wav&#8221; to my project (and made sure it added it to the folder as well)</p>
<pre name="code" class="c++">
SystemSoundID bell;
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"bell" ofType:@"wav"]], &#038;bell);
AudioServicesPlaySystemSound (bell);
</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fblog.logichigh.com%2F2009%2F02%2F14%2Fplay-a-short-sound-in-your-iphone-application-the-right-way%2F&amp;title=Play%20a%20short%20sound%20in%20your%20iPhone%20application%20the%20RIGHT%20WAY" id="wpa2a_2"><img src="http://blog.logichigh.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.logichigh.com/2009/02/14/play-a-short-sound-in-your-iphone-application-the-right-way/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

