<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>cocos2d for iPhone &#187; Tag: CocosDenshion - Recent Posts</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/cocosdenshion</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 04:04:55 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/tags/cocosdenshion" rel="self" type="application/rss+xml" />

		<item>
			<title>Arbel on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-143452</link>
			<pubDate>Thu, 09 Feb 2012 15:09:21 +0000</pubDate>
			<dc:creator>Arbel</dc:creator>
			<guid isPermaLink="false">143452@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Ah I see.  I feel dumb for not knowing about all these samples.  Got it building and running on the device.  Seem super quick so Ill take a look at how it implements sound in depth.  Thanks!
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-143447</link>
			<pubDate>Thu, 09 Feb 2012 14:44:26 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">143447@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/14967'>Arbel</a> -  it doesn't have a project file you just change the target in XCode like any other demo that ships with cocos2d.
</p></description>
		</item>
		<item>
			<title>Arbel on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-143444</link>
			<pubDate>Thu, 09 Feb 2012 14:17:04 +0000</pubDate>
			<dc:creator>Arbel</dc:creator>
			<guid isPermaLink="false">143444@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>So I tested it by not playing the sounds on touches, but when the notes were supposed to be hit.  Same lag issue..so maybe its not completely about touches...However, when I ran it on the simulator for the first time, most of the lag was gone!  Im not sure really what this means tho...</p>
<p>@<a href='http://www.cocos2d-iphone.org/forum/profile/131'>Steve</a>  Thanks, however I couldn't find the sample project file, just the source plus sounds.  Last time I had those and could get it to compile but nothing was playing.  Will give it a shot again!</p>
<p>@<a href='http://www.cocos2d-iphone.org/forum/profile/57377'>JC</a> Im not doing it quite like how Guitar Hero does it, similar to Reflect Beat or Cytus if you've played?  The sound will be played when the user touches, so they can hear if they are getting "off-beat".  I know this is possible at least on the iPad, as Reflect Beat (A konami music game for iPad/Arcade) used note sounds, and they are perfectly on time.  I appreciate the advice though :)  Did you make a music game?
</p></description>
		</item>
		<item>
			<title>JC on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-143429</link>
			<pubDate>Thu, 09 Feb 2012 10:50:43 +0000</pubDate>
			<dc:creator>JC</dc:creator>
			<guid isPermaLink="false">143429@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>do you want to do something similar to guitar hero ?</p>
<p>if yes, for me, you don't have to play sound when user do input, you play sound when it 'must' be played and "tweek" it depending on user touch.</p>
<p>ex :</p>
<p>in your "music", you have to play the sound "XXX" at 1.0 sec:<br />
- you play it at 1.0 and keep is handle<br />
-&#62; if you get no input from user during X ms, cut/fadeout the sound<br />
-&#62; if you get wrong input from user, modulate sound frequency<br />
-&#62; is you get good input from user, do nothing</p>
<p>it's only a short sample, on how I probably do something similar to guitar hero. you will probably need some other tricks like reminding the user do nothing on previous sound so play next sound with volume off and fade in if inputs coming...</p>
<p>anyway, i think there is no way to have no latency between touch input and sound playing in music games.
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-143428</link>
			<pubDate>Thu, 09 Feb 2012 10:41:28 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">143428@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>The DrumPad demo ships with cocos2d, it includes all the sound files.
</p></description>
		</item>
		<item>
			<title>Arbel on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-143426</link>
			<pubDate>Thu, 09 Feb 2012 10:37:48 +0000</pubDate>
			<dc:creator>Arbel</dc:creator>
			<guid isPermaLink="false">143426@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Havent looked at this for a while but attempted to download the DrumPad demo and get it working.  Does anyone have a link to the project file?  The demo I found only had source files and I tried to make the project but when I got it running I was getting no sounds.</p>
<p>As for the lag issues, Ive been experimenting by removing all of my touchMove code, changing the file to mono, and enabling the flag for fast event in cc config.  Nothing seems to change.</p>
<p>Anyone have any additional advice on where I could look?
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Crash on become active - iOS5 sound related?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/21909/page/2#post-143409</link>
			<pubDate>Thu, 09 Feb 2012 07:25:58 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">143409@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/78424'>ruggy</a> - yes the fix is the one detailed in the thread.  Another possibility I thought of is to change the order of initialisation of GC and CocosDenshion.  NSNotificationCentre always seems to notify observers in the order they were added so changing the initialisation order of GC and CocosDenshion should change the order in which they are notified when the app resumes.
</p></description>
		</item>
		<item>
			<title>ruggy on "Crash on become active - iOS5 sound related?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/21909/page/2#post-143158</link>
			<pubDate>Tue, 07 Feb 2012 22:31:05 +0000</pubDate>
			<dc:creator>ruggy</dc:creator>
			<guid isPermaLink="false">143158@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi,<br />
   Just to mention, I think I'm having the same problem. It doesn't happen on my local setup so it's extremely difficult for me to fix/test. I think it's this problem because looking at crash logs for a game that's already out it mentions audiosession/timeout a lot and partly because when I submitted the free version it failed twice because of "timeouts" when apple ran it on iPhone4/iOS5 - though it always loads very quickly for me. I also use GC.<br />
 Is there a fix? Or is it the timer workaround? (I haven't tried that yet though my objctive C isn't strong, I use CocosDenshion in an OpenGL C++ project).
</p></description>
		</item>
		<item>
			<title>badgerr on "CDSoundSource mute has no effect"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28832#post-142182</link>
			<pubDate>Wed, 01 Feb 2012 17:42:47 +0000</pubDate>
			<dc:creator>badgerr</dc:creator>
			<guid isPermaLink="false">142182@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Sadly your suggestion had no effect, as, internally, all soundSourceForFile does is query the buffer manager for the id (that gets returned from playEffect) and passes it into soundSourceForSound. My example was simply skipping the buffer lookup by storing the value it returns.</p>
<p>*edit*<br />
I believe the behaviour of soundSourceForSound is not what I want: this function appears to find the <strong>next available</strong> source index, creates a CDSoundSource object for that, then attempts to migrate the buffer associated with sourceId to the new index. The absence of a "get" or "create" specifier in this function name made it ambiguous to me, as I thought it was an accessor for existing sound sources, when it is not. </p>
<p>The behaviour of _soundSourceAttachToBuffer appears to <strong>stop</strong> playback of the source before performing this switch. Again, this is not what I want. </p>
<p>Since playSound does in fact return the ALuint of the sound source as expected by OpenAL, I have instead opted to store this value, and add a setSoundGain:(ALuint) soundId gain:(float) g; function to CDSoundEngine to serve my requirement of muting.
</p></description>
		</item>
		<item>
			<title>pepeek on "SimpleAudioEngine and Video Ads"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22239#post-142140</link>
			<pubDate>Wed, 01 Feb 2012 13:16:41 +0000</pubDate>
			<dc:creator>pepeek</dc:creator>
			<guid isPermaLink="false">142140@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>This trick did not help for me. The interstitial ad takes over the sound and when the ad is closed and control is back in my app then the sound is still dead.<br />
The only help is to replace the scene in CCDirector - then the sound is back.<br />
I'm on latest Cocos2d 1.x and iOS4. Any help please?</p>
<p>Edit: oops, my bad. I had to resume the background music and all was fine. Thanks anyway!!!</p>
<p>--Josef
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "CDSoundSource mute has no effect"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28832#post-142077</link>
			<pubDate>Tue, 31 Jan 2012 23:51:46 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">142077@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>You are passing the wrong number to soundSourceForSound and you don't easily have access to the number you need if you use SimpleAudioEngine. Use soundSourceForFile which is designed for use with SimpleAudioEngine.
</p></description>
		</item>
		<item>
			<title>badgerr on "CDSoundSource mute has no effect"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28832#post-142062</link>
			<pubDate>Tue, 31 Jan 2012 21:23:00 +0000</pubDate>
			<dc:creator>badgerr</dc:creator>
			<guid isPermaLink="false">142062@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I am trying to directly control the gain of CDSoundSource objects, as I want to mute some sound effects but not others.</p>
<p><code>alListenerf(AL_GAIN, g)</code> correctly controls volume of all effects, however, <code>alSourcef(id, AL_GAIN, g)</code> has no effect.</p>
<p>This can be seen in a "from scratch" project I knocked up with the XCode4 template and some minor code modifications to SimpleAudioEngine:</p>
<p>In SimpleAudioEngine.h:<br />
<code>-(void) muteEffect:(ALuint) soundId;</code></p>
<p>In SimpleAudioEngine.m:<br />
<pre><code>-(void) muteEffect:(ALuint) soundId {
  CDSoundSource *result = [soundEngine soundSourceForSound:soundId sourceGroupId:0];
  if(result) {
    result.mute = YES;
  }
}</code></pre>
<p>Now a simple example of playing an effect then muting it still results in it being audible:</p>
<pre><code>int soundId = [[SimpleAudioEngine sharedEngine] playEffect:@&#34;test.caf&#34;];
[[SimpleAudioEngine sharedEngine] muteEffect:soundId];</code></pre>
<p>As I step through the code in the debugger I can see all of the correct code paths being followed, and the alSourcef functions being called, with no error codes in lastError.</p>
<p>The problem occurs in both the iOS5 simulator and an iPhone 4 running 4.3.2.</p>
<p>Why doesn't this work?
</p></description>
		</item>
		<item>
			<title>lummis on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140944</link>
			<pubDate>Tue, 24 Jan 2012 02:12:14 +0000</pubDate>
			<dc:creator>lummis</dc:creator>
			<guid isPermaLink="false">140944@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>As follow-up to wrap up this thread... the culprit was definitely the Xcode "exception breakpoint". It's supposed to be a feature that helps debugging by showing you the line of source code that triggered an exception but apparently it caused an exception itself. I don't know why. I could give more details but probably no one is interested.  The lesson is... don't turn on the Exception Breakpoint in a cocos2d project, at least not without knowing more about it than I know.
</p></description>
		</item>
		<item>
			<title>lummis on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140776</link>
			<pubDate>Mon, 23 Jan 2012 04:59:17 +0000</pubDate>
			<dc:creator>lummis</dc:creator>
			<guid isPermaLink="false">140776@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Ok I'm giving up for tonight. I followed up on your last post as follows:</p>
<p>No other audio is playing.</p>
<p>I ran "Fade To Gray" and to my surprise it also stopped at line 209 in CocosDenshion.m with context == 0x19. Then I realized that I had just recently added the Xcode 4 "Exception Breakpoint" feature to my project and it's a global change to Xcode so it was also installed for Fade To Gray. (see <a href="http://ijoshsmith.com/2011/11/28/debugging-exceptions-in-xcode-4-2/)" rel="nofollow">http://ijoshsmith.com/2011/11/28/debugging-exceptions-in-xcode-4-2/)</a>. If I understand it right it installs some kind of pseudo-breakpoint at every statement but only triggers one if an exception occurs. The purpose is to help you get more information about the state of your variables than you get with the exception message. I don't know why it stopped at line 209. I'm guessing that something in cocos2d conflicts with the exception breakpoint feature. 0x19 might be some kind of jump table address or interrupt table associated with exception breakpoints.</p>
<p>I deleted the exception breakpoint and then Fade To Grey ran without stopping. I though Great! I'll go back and remove it from my project and I'm back in business. But alas! My project still hangs but this time with no Dension message and at a different place (actually I don't know where it hangs now). I may well have changed something in the course of debugging that is now making it hang. Or I have a memory bug that I didn't find yet.</p>
<p>I have to stop now. I'll continue tomorrow. Thank you very much for your help.
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140764</link>
			<pubDate>Mon, 23 Jan 2012 03:12:24 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">140764@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>What other audio is playing?   Also, the value of 0x19 for the context doesn't seem correct.  This should be a memory address.  Maybe try one of the CocosDenshion demos and put a break point on line 209 and see what the value of context is.  A value of 0x19 does seem to indicate the memory has been overwritten.
</p></description>
		</item>
		<item>
			<title>lummis on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140763</link>
			<pubDate>Mon, 23 Jan 2012 03:06:53 +0000</pubDate>
			<dc:creator>lummis</dc:creator>
			<guid isPermaLink="false">140763@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>With #<a href='http://www.cocos2d-iphone.org/forum/tags/define'>define</a> CD_DEBUG commented out I just get this:<br />
AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved</p>
<p>Catchpoint 2 (exception thrown).(gdb)</p>
<p>with execution stopping at line 209 in CocosDenshion.m (same as previously reported)<br />
= = = = = =  =<br />
With #<a href='http://www.cocos2d-iphone.org/forum/tags/define'>define</a> CD_DEBUG 2 I get:<br />
2012-01-22 21:49:57.103 Darken[1214:12503] Denshion::CDAudioManager - Other audio is not playing audio will be exclusive<br />
2012-01-22 21:49:57.104 Darken[1214:12503] Denshion::CDAudioManager - Audio session set category AVAudioSessionCategorySoloAmbient failed with error Error Domain=NSOSStatusErrorDomain Code=-50 "The operation couldn’t be completed. (OSStatus error -50.)"<br />
2012-01-22 21:49:57.104 Darken[1214:12503] Denshion::CDSoundEngine - mixer output rate set to 44100.00<br />
AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved</p>
<p>Catchpoint 2 (exception thrown).Current language:  auto; currently objective-c<br />
(gdb)<br />
= = = = = = =<br />
That doesn't give any more to go on as far as I can see. The error number (-50) is the same as before.</p>
<p>I already did move [SimpleAudioEngine sharedEngine] once but I'll try moving it to a more distant place and also check over everything I did recently looking for a memory bug. I can see that's a good possibility. It certainly wouldn't be the first time I "successfully created" a memory bug :)
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140757</link>
			<pubDate>Mon, 23 Jan 2012 02:32:42 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">140757@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>If it used to work and then "magically" stopped working then that sounds like classic memory corruption.  Check for any code that could write beyond the end of an array and check for any code that could access the memory of an object that has been released.  Moving the location of where you initialise CocosDenshion may cause the objects  to be moved in memory, try to move it to later in the apps life cycle.  If this fixes things you definitely have memory corruption.
</p></description>
		</item>
		<item>
			<title>lummis on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140755</link>
			<pubDate>Mon, 23 Jan 2012 02:25:45 +0000</pubDate>
			<dc:creator>lummis</dc:creator>
			<guid isPermaLink="false">140755@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Sadly that wasn't it.  I commented out everything related to game center, which wasn't much, and totally removed the gameCenterManager class from the project and moved the files out of the folder just to be positive. Then cleaned and rebooted just to be sure again. But it's still throwing the exact same error in cocosDenshion. </p>
<p>I'll try setting CD_DEBUG to 2 and see if I can make anything out of the messages.</p>
<p>I could also comment out all the sound code. But if Dension crashes the first time [SimpleAudioEngine sharedEngine] is called then the rest of the sound code probably isn't involved.</p>
<p>Thanks for your help. Do you have any further suggestions?
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140747</link>
			<pubDate>Mon, 23 Jan 2012 01:52:59 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">140747@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Simply initialising Game Centre would cause the problem to occur, you should be able to confirm by commenting out your Game Centre initialisation.  You could try changing the order of initialisation e.g initialise Game Centre after CocosDenshion or vice versa.  However, I thought this problem only occurred on iOS 5.x but that could be a red herring.
</p></description>
		</item>
		<item>
			<title>lummis on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140744</link>
			<pubDate>Mon, 23 Jan 2012 01:38:34 +0000</pubDate>
			<dc:creator>lummis</dc:creator>
			<guid isPermaLink="false">140744@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>YES!! I just started adding game center support although I haven't made a game center connection yet. I'm using iOS 4.2.10 on the device and 4.3 on the simulator but maybe it's the same problem. </p>
<p>I'll check out the the large thread you mention.</p>
<p>Thank you very much.
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140737</link>
			<pubDate>Mon, 23 Jan 2012 00:49:37 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">140737@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Did you recently add Game Centre support to your app?  If so Game Centre interferes with CocosDenshion on iOS 5.x even if you aren't using its in game chat functionality.  There is a large thread discussing the issue with a work around.</p>
<p>Otherwise it could be memory corruption that has corrupted the OpenAL context.</p>
<p>If you set CD_DEBUG to 2 you will get verbose debugging (same as CC_DEBUG).
</p></description>
		</item>
		<item>
			<title>lummis on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140729</link>
			<pubDate>Sun, 22 Jan 2012 23:43:30 +0000</pubDate>
			<dc:creator>lummis</dc:creator>
			<guid isPermaLink="false">140729@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Also... I forgot to say that I did "clean", deleted the app from the simulator, and rebooted more than once but none of that made any difference.
</p></description>
		</item>
		<item>
			<title>lummis on "Could someone please help with this cocosDenshion crash?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28572#post-140690</link>
			<pubDate>Sun, 22 Jan 2012 19:33:14 +0000</pubDate>
			<dc:creator>lummis</dc:creator>
			<guid isPermaLink="false">140690@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm using cocos2d 1.0.1 and Xcode 4.2.1 on Lion. I don't see any version number in the cocosDension files. They say copyright 2010. This same crash occurs on both the simulator and the device. The rest of this description refers to running on the simulator. </p>
<p>I tried running two of the Denshion tests (demos) and they work as expected. </p>
<p>Prior to this I ran the project many times (in debug mode) without a sound problem (probably hundreds of times). So far as I know I didn't change anything related to sound before the crash started happening -- I was repeatedly changing the text of several labels to make them look right and none of them are associated with any sounds. Thinking that maybe I'm running out of memory I deleted all of the labels I was editing (a few hundred bytes), which definitely makes them smaller than they were before the crash, but I still get the crash.</p>
<p>Running of the simulator I get the following message when the crash happens. (It is possible that I always had this message even when it didn't crash):</p>
<p>2012-01-22 13:51:40.932 Darken[1772:12503] Denshion::CDAudioManager - Audio session set category AVAudioSessionCategorySoloAmbient failed with error Error Domain=NSOSStatusErrorDomain Code=-50 "The operation couldn’t be completed. (OSStatus error -50.)"<br />
AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved</p>
<p>"macerror -50" gives this description for error -50: "Mac OS error -50 (paramErr): error in user parameter list" </p>
<p>Backtrace shows that the last statement of mine before the crash was:<br />
<code>sae = [SimpleAudioEngine sharedEngine];</code></p>
<p>and that is the first time SimpleAudioEngine is called in my project.</p>
<p>The last statement in Denshion before the crash is CocosDension.m line 209:<br />
<code>alcMakeContextCurrent(context);</code></p>
<p>and the value of context is 0x19. I couldn't figure out if 0x19 is a valid value. (If it isn't that would agree with the OS error -50 description.)</p>
<p>In accordance with a comment in CDConfig.h I enabled:<br />
<code>#<a href='http://www.cocos2d-iphone.org/forum/tags/define'>define</a> CD_DEBUG 1</code> </p>
<p>but that didn't result in any additional messages. </p>
<p>Now I'm out of debugging ideas and I'm stuck. I can't work on my project because it won't run. I would be grateful if someone could tell me what's wrong or at least suggest a way to debug this crash.
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-138978</link>
			<pubDate>Wed, 11 Jan 2012 00:03:28 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">138978@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Are you sure you are processing all the touches?  You can look at the CocosDenshion DrumPad demo for an example of touch handling.  You can also use that to experiment with the latencies by trying to play along with the loop or replace the loop with one of your songs.
</p></description>
		</item>
		<item>
			<title>Arbel on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-138901</link>
			<pubDate>Tue, 10 Jan 2012 14:14:44 +0000</pubDate>
			<dc:creator>Arbel</dc:creator>
			<guid isPermaLink="false">138901@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks for the reply.  There doesn't appear to be any gap even with 4-5 in a row, so maybe its not the sound playing thats the issue.  If it is in the touch processing I wonder what I can do to solve that issue.  I actually moved it to the first line of my ccTouchesBegan, before determining if a note was hit, but still the same delay.  </p>
<p>I played an iPad music game recently, Reflect Beat, and it has something similar to what I want to achieve.  No delay between sounds and button presses.  Perhaps Im just doing something stupid.
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-138894</link>
			<pubDate>Tue, 10 Jan 2012 13:09:54 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">138894@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>What makes you think it is the sound that is lagging?  OpenAL (as used by playEffect) is very low latency.  Try playing two sounds in a row e.g. </p>
<pre><code>[[SimpleAudioEngine sharedEngine] playEffect:@&#34;Assist.wav&#34;];
[[SimpleAudioEngine sharedEngine] playEffect:@&#34;Assist.wav&#34;];</code></pre>
<p>Can you hear any gap?  I had one user who wondered why the volume of his sounds were so loud - it was because he inadvertently was playing simultaneous copies of each sound.  It wasn't until he was playing 11 copies of the sound that I heard a phasing effect which twigged me to the fact that multiple sounds may be playing.</p>
<p>If there is lag my guess is it is in processing the touches.
</p></description>
		</item>
		<item>
			<title>Arbel on "Ways to reduce sound lag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28230#post-138891</link>
			<pubDate>Tue, 10 Jan 2012 11:50:27 +0000</pubDate>
			<dc:creator>Arbel</dc:creator>
			<guid isPermaLink="false">138891@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I am making a music game and when the user presses a note it will produce a sound. The sound naturally needs to play immediately when the user presses, so they can tell whether they are in time with the music. However, it feels as if the sound is lagging, especially when note presses become quicker.</p>
<p>My background .m4a music file is played with AVAudioPlayer. I chose to use this as I have access to the currentTime property. I may be wrong, but I dont think I can access this with CocosDenshion.</p>
<p>I made a .wav file which is extremely short (a few hundred milliseconds). I preload my sound effect on init:</p>
<pre><code>[[SimpleAudioEngine sharedEngine] preloadEffect:@&#34;Assist.wav&#34;];</code></pre>
<p>Then to play the sound effect, in CCTouchesBegan I call:<br />
<pre><code>[[SimpleAudioEngine sharedEngine] playEffect:@&#34;Assist.wav&#34;];</code></pre>
<p>After that it calls my code to determine the users timing and awards points. Any idea why it might be lagging, or a better way to play sound effects in time with music?
</p></description>
		</item>
		<item>
			<title>stilett0 on "CocosDenshion device audio adjustment not working"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/22380#post-138323</link>
			<pubDate>Fri, 06 Jan 2012 04:58:56 +0000</pubDate>
			<dc:creator>stilett0</dc:creator>
			<guid isPermaLink="false">138323@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Wow, I really wish you could tell me which audio session types you used...you mean you changed the audio session types of the movieplayercontrollers? </p>
<p>I can't use CCVideoPlayer, since I'm displaying elements above the movies.  Please let me know if you remember any more details.  Thanks.
</p></description>
		</item>
		<item>
			<title>PDiTO on "Crash on become active - iOS5 sound related?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/21909/page/2#post-132012</link>
			<pubDate>Wed, 07 Dec 2011 05:07:27 +0000</pubDate>
			<dc:creator>PDiTO</dc:creator>
			<guid isPermaLink="false">132012@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/131'>Steve</a>,</p>
<p>My app is also authenticating Game Center on resume, but I don't use the Game Center chat facility. Just standard leader board and achievements.</p>
<p>Just checked out borked definition on urban dictionary...definitely my new word of the day!</p>
<p>@<a href='http://www.cocos2d-iphone.org/forum/profile/40407'>donutzeatpeople</a></p>
<p>To detect GC authentication changes as Steve correctly says, you register for notifications with notification center. The name is GKPlayerAuthenticationDidChangeNotificationName. You can then use subsequent methods that are run upon this notification to check [GKLocalPlayer localPlayer].isAuthenticated.</p>
<p>If you are seeing this behaviour happen but outside of your code I assume you are using some sort of helper class, which probably does things correctly.  I could be wrong, but I don't see many benefits in changing/delaying this behaviour.
</p></description>
		</item>
		<item>
			<title>Steve Oldmeadow on "Crash on become active - iOS5 sound related?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/21909/page/2#post-131998</link>
			<pubDate>Wed, 07 Dec 2011 03:03:27 +0000</pubDate>
			<dc:creator>Steve Oldmeadow</dc:creator>
			<guid isPermaLink="false">131998@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Okay, my guess is the problem is caused by AVFoundation audio being borked on iOS 5 and the interaction of Game Center and CocosDenshion when the app resumes.</p>
<p>This line in the crash log gives us a clue it is Game Center:<br />
<pre><code>Oct 17 14:32:49 unknown mediaserverd[6401] &#60;Error&#62;: 14:32:49.368387 com.apple.AVConference: /SourceCache/GameKitServices/GameKitServices-344.3/AVConference.subproj/Sources/AVConferenceServer.m:1867: AVConferenceServerStart</code></pre>
<p>Do you guys use the in game chat facility of Game Center?  If not it seems like that comes along for the ride whether you want it or not.</p>
<p>As for Game Center resuming, it probably uses exactly the same strategy as CocosDenshion when you tell it to auto handle resignation - i.e. it registers for notifications with the notification center.
</p></description>
		</item>

	</channel>
</rss>

