<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>Hi Dan,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span>Thanks for your help. I know they're holding off the rewrite in OF 7 due to time and budgetary constraints, but we think there was another reason why it kept hanging.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">A,
 external I wrote in C gives out sample accurate events (rather that block-aligned ones) as well as a signal. The outlet_float statements were embedded within the DSP loop. You can get away with this in Pd running on a computer, but it doesn't work on an iPhone.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">This may be bad programming (I'm not sure - I taught myself) but it does cause Pd to crash when DSP is turned off in ofxPd on iOS. The DSP never got turned off and a chunk of audio was left looping, regardless of what the DSP chain was supposed to be doing, both in the simulator and on the device.</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif;
 background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Anyhow, I re-coded the external using a Pd clock to block-align the events and the problem went away. And I have finally learned to use clocks in Pd external coding! Ah, what fun I'm going to have ,-)</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Does anyone know what the standard blocksize for writing RT audio from memory to the SD card in an iPhone is? That's another problem we're facing. Drop-outs happen when recording, and we think it might be because we need to deal with the audio in certain
 size chunks, but we're not sure what that size might be. And do they have to synchronize with Pd's block size (i.e. 64 samples) in order for this to work?</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Cheers,</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">Ed</div><div></div><div>&nbsp;</div><div>Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad<br>http://www.ninjajamm.com/<br><br></div><div>Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!<br>http://sharktracks.co.uk/&nbsp;<br> <blockquote style="border-left: 2px solid rgb(16, 16,
 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Dan Wilcox &lt;danomatika@gmail.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> Ed Kelly &lt;morph_2016@yahoo.co.uk&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> Peter Brinkmann &lt;peter.brinkmann@googlemail.com&gt;; PD List &lt;pd-list@iem.at&gt;; Andrew Wallen &lt;andy.wallen@seeper.com&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 11 July 2013, 17:17<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: libPd hanging audio<br> </font> </div> <div class="y_msg_container"><br><div id="yiv2263653503"><div><div>You could try the 007 tag:&nbsp;<a
 rel="nofollow" target="_blank" href="https://github.com/danomatika/ofxPd/releases">https://github.com/danomatika/ofxPd/releases</a>, everything after that will not work without some src modifications. (It may not be that much).</div><div><br></div><div>Personally, I would consider updating your version of OF. You'd need to remake the xcode project, but the sound stuff is in a much better shape.</div><br><div><div>On Jul 11, 2013, at 12:11 PM, Ed Kelly &lt;<a rel="nofollow" ymailto="mailto:morph_2016@yahoo.co.uk" target="_blank" href="mailto:morph_2016@yahoo.co.uk">morph_2016@yahoo.co.uk</a>&gt; wrote:</div><br class="yiv2263653503Apple-interchange-newline"><blockquote type="cite"><div style="background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div>Hi Dan,<br><br>Thanks for quick response.&nbsp;Even with these compiler flags, we get the same result. On the same page there is this:<br><br></div><div
 style="font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;">"RtAudio Hang on Exit in 0062<br>"RtAudio will hang on app exit in OF 0062. The only way to fix this is to make a small edit to the OF 0062 core by "editing&nbsp;lib/openFrameworks/sound/ofSoundStream.cpp&nbsp;and commenting line 143 so close() is not called."</div><div style="font-size: 16px; font-family: arial, helvetica, sans-serif; background-color: transparent; font-style: normal;"><br>I'm not entirely sure which version we're using, but the ofSoundStream.cpp file is only 140 lines long.<br>If we upgrade to the latest
 ofxPd, will it still work with OF 6.2?<br>Cheers,<br>Ed<br><br>Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad<br><a rel="nofollow" target="_blank" href="http://www.ninjajamm.com/">http://www.ninjajamm.com/</a><br><br><br>Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!<br><a rel="nofollow" target="_blank" href="http://sharktracks.co.uk/">http://sharktracks.co.uk/</a><br><br><br>&gt;________________________________<br>&gt; From: Dan Wilcox &lt;<a rel="nofollow" ymailto="mailto:danomatika@gmail.com" target="_blank" href="mailto:danomatika@gmail.com">danomatika@gmail.com</a>&gt;<br>&gt;To: Ed Kelly &lt;<a rel="nofollow" ymailto="mailto:morph_2016@yahoo.co.uk" target="_blank" href="mailto:morph_2016@yahoo.co.uk">morph_2016@yahoo.co.uk</a>&gt; <br>&gt;Cc: Peter Brinkmann &lt;<a rel="nofollow" ymailto="mailto:peter.brinkmann@googlemail.com" target="_blank"
 href="mailto:peter.brinkmann@googlemail.com">peter.brinkmann@googlemail.com</a>&gt;; PD List &lt;<a rel="nofollow" ymailto="mailto:pd-list@iem.at" target="_blank" href="mailto:pd-list@iem.at">pd-list@iem.at</a>&gt;; Andrew Wallen &lt;<a rel="nofollow" ymailto="mailto:andy.wallen@seeper.com" target="_blank" href="mailto:andy.wallen@seeper.com">andy.wallen@seeper.com</a>&gt; <br>&gt;Sent: Thursday, 11 July 2013, 16:52<br>&gt;Subject: Re: libPd hanging audio<br>&gt; <br>&gt;<br>&gt;<br>&gt;Howdy guys,<br>&gt;<br>&gt;See&nbsp;<a rel="nofollow" target="_blank" href="https://github.com/danomatika/ofxPd#for-xcode-1">https://github.com/danomatika/ofxPd#for-xcode-1</a><br>&gt;<br>&gt;<br>&gt;From my notes, I have:&nbsp;-DHAVE_UNISTD_H -DUSEAPI_DUMMY -DPD -dynamiclib -ldl -lm<br>&gt;<br>&gt;<br>&gt;I also added this to the libpd Github wiki:&nbsp;<a rel="nofollow" target="_blank"
 href="https://github.com/libpd/libpd/wiki/libpd#build-settings">https://github.com/libpd/libpd/wiki/libpd#build-settings</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;On Jul 11, 2013, at 11:45 AM, Ed Kelly &lt;<a rel="nofollow" ymailto="mailto:morph_2016@yahoo.co.uk" target="_blank" href="mailto:morph_2016@yahoo.co.uk">morph_2016@yahoo.co.uk</a>&gt; wrote:<br>&gt;<br>&gt;Hi Dan, Peter,<br>&gt;&gt;<br>&gt;&gt;I'm here with our ofxPd-based iPhone app, and we are getting a repeat of a particular problem listed here:<br>&gt;&gt;<a rel="nofollow" target="_blank" href="http://createdigitalnoise.com/discussion/150/pdbase-closepatch/p1">http://createdigitalnoise.com/discussion/150/pdbase-closepatch/p1</a><br>&gt;&gt;<br>&gt;&gt;Namely:<br>&gt;&gt;<br>&gt;&gt;&gt; when closing a patch I would receive
 this message:&nbsp;sys_close_audio: unknown API 9<br>&gt;&gt;<br>&gt;&gt;and then we get a buzz, like a block of audio is being looped. We can't closePatch from the app code, nor can we turn DSP off from the app code.<br>&gt;&gt;<br>&gt;&gt;In the forum post mentioned above, Peter Brinkmann said this was due to incorrect compiler flags. Can you tell us what the compiler flags were and what they were changed to?<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;Caveat - we are still using openFrameworks 6.2.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;Cheers,<br>&gt;&gt;Ed Kelly<br>&gt;&gt;<br>&gt;&gt;Ninja Jamm - a revolutionary new music remix app from Ninja Tune and Seeper, for iPhone and iPad<br>&gt;&gt;<a rel="nofollow" target="_blank" href="http://www.ninjajamm.com/">http://www.ninjajamm.com/</a><br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;Gemnotes-0.2: Live music notation for<br> Pure Data, now with dynamics!<br>&gt;&gt;<a rel="nofollow" target="_blank"
 href="http://sharktracks.co.uk/">http://sharktracks.co.uk/</a><br>&gt;<br>&gt;--------<br>&gt;Dan Wilcox<br>&gt;@danomatika<br>&gt;<a rel="nofollow" target="_blank" href="http://danomatika.com/">danomatika.com</a><br>&gt;<a rel="nofollow" target="_blank" href="http://robotcowboy.com/">robotcowboy.com</a><br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;</div>&nbsp;&nbsp;&nbsp;&nbsp;</div></blockquote></div><br><div>
<span class="yiv2263653503Apple-style-span" style="border-collapse:separate;border-spacing:0px;"><div style="word-wrap:break-word;"><span class="yiv2263653503Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px;"><div style="word-wrap:break-word;"><div>--------</div><div>Dan Wilcox</div><div>@danomatika</div><div><a rel="nofollow" target="_blank" href="http://danomatika.com/">danomatika.com</a></div><div><a rel="nofollow" target="_blank" href="http://robotcowboy.com/">robotcowboy.com</a></div><div><br></div></div></span><br class="yiv2263653503Apple-interchange-newline"></div></span><br class="yiv2263653503Apple-interchange-newline"><br
 class="yiv2263653503Apple-interchange-newline">
</div>
<br></div></div><br><br></div> </div> </div> </blockquote>  </div></div></body></html>