<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>> I know various questions keep coming up about this feature. Is it needed and, if so, is it needed on all platforms. For example, if it doesn't apply to macOS maybe we can hide the checkbox.</div>

<div> </div>

<div>Generally, the callback scheduler does its job (advancing the scheduler, notifying the GUI, receiving MIDI, etc.) directly in the audio callback function, which I wouldn't recommend in the case of Pd because many operations are not realtime safe. *)</div>

<div> </div>

<div>The polling scheduler, on the other hand, does all its work in a seperate thread and communicates with the audio callback via a lockfree FIFO (aka FAKEBLOCKING). Note that the latency/delay parameter only applies to the polling scheduler (it basically adds some extra space to the ring buffer to compensate for fluctuations in CPU load).</div>

<div> </div>

<div>There are some parts in the callback scheduler code which I don't really understand, e.g. why sched_tick() is also called in m_callbackscheduler() although it is already called in<span style=" color:#000000;"> sched_audio_callbackfn()</span><span style=" color:#000000;">...</span></div>

<div><span style=" color:#000000;">Also, it's quite easy to hang Pd or get weird audio glitches... Actually, I don't think anyone is actually using it as it doesn't seem to offer any benefits. Maybe it's time to rip it out completely...</span></div>

<div> </div>

<div><span style=" color:#000000;">Christof</span></div>

<div> </div>

<div><span style=" color:#000000;">*) SuperCollider also runs its synthesis engine directly in the audio callback, but this is only works so well because they make sure that all operations are realtime safe, i.e. no system calls, no IO operations, no memory allocations with malloc/free, etc.</span></div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Freitag, 02. August 2019 um 23:12 Uhr<br/>
<b>Von:</b> "Dan Wilcox" <danomatika@gmail.com><br/>
<b>An:</b> "Miller Puckette" <msp@ucsd.edu><br/>
<b>Cc:</b> pd-dev <pd-dev@lists.iem.at><br/>
<b>Betreff:</b> Re: [PD-dev] Pd hangs on exit on macOS</div>

<div name="quoted-content">
<div>Ok. I figured it out. I thought I was going crazy and, since I many different builds of Pd for testing various things, I was also getting a bit lost as to what I might have changed and when.
<div> </div>

<div>At some point, I had enabled the "Use callbacks" checkbox in the Audio dialog. Using Forget all settings, then restarting Pd and enabling that checkbox will make Pd hang. Try it out Alex...</div>

<div> </div>

<div>I know various questions keep coming up about this feature. Is it needed and, if so, is it needed on all platforms. For example, if it doesn't apply to macOS maybe we can hide the checkbox.
<div> 
<blockquote>
<div>On Aug 2, 2019, at 10:59 PM, Alexandre Torres Porres <<a href="mailto:porres@gmail.com" onclick="parent.window.location.href='mailto:porres@gmail.com'; return false;" target="_blank">porres@gmail.com</a>> wrote:</div>

<div>
<div>
<div> </div>

<div class="gmail_quote">
<div class="gmail_attr">Em sex, 2 de ago de 2019 às 17:50, Dan Wilcox <<a href="mailto:danomatika@gmail.com" onclick="parent.window.location.href='mailto:danomatika@gmail.com'; return false;" target="_blank">danomatika@gmail.com</a>> escreveu:</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>I tested with the following builds from Miller's site: 0.49-1, 0.49-1-i386, 0.49-0test5, 0.48-2, 0.48-1, 0.48-0. (0.47 and previous do not run as the GUI can't find Tk 8.4).
<div> </div>

<div>*All* hang my on system after doing the following:
<div> </div>

<div>1. open Pd app</div>

<div>2. turn on DSP</div>

<div>3. open audio test patch</div>

<div>4. turn off DSP</div>

<div> </div>

<div>GUI goes unresponsive and pd core process pegs CPU. I then have to use "killall pd" on the command line.</div>
</div>
</div>
</blockquote>

<div> </div>

<div>not a problem for me doing exactly what you listed  </div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>
<div>
<div> </div>

<div>Pd-extended does not hang and is able to restart audio after toggling DSP.</div>

<div> </div>

<div>This is a strange issue as I don't remember when it started happening. I feel like Pd was running fine when I first updated to macOS 10.14, so I wonder if it's some sort of issuer with my system only. This is also not a problem on my macOS 10.13 machine at work.</div>

<div>
<div> 
<blockquote>
<div>On Aug 2, 2019, at 1:35 AM, Alexandre Torres Porres <<a href="mailto:porres@gmail.com" onclick="parent.window.location.href='mailto:porres@gmail.com'; return false;" target="_blank">porres@gmail.com</a>> wrote:</div>
 

<div>
<div>
<div> </div>
 

<div class="gmail_quote">
<div class="gmail_attr">Em qui, 1 de ago de 2019 às 19:27, Dan Wilcox <<a href="mailto:danomatika@gmail.com" onclick="parent.window.location.href='mailto:danomatika@gmail.com'; return false;" target="_blank">danomatika@gmail.com</a>> escreveu:</div>

<blockquote class="gmail_quote" style="margin: 0.0px 0.0px 0.0px 0.8ex;border-left: 1.0px solid rgb(204,204,204);padding-left: 1.0ex;">
<div>You can also open the Activity Monitor app and search for "pd." If the process has hung, it may also display "Not Responding" next to it.</div>
</blockquote>

<div> </div>

<div>Well, like I said, I've been using Pd 0.49-1 without anything funny happening, no hanging whatsoever. At least without noticing it, and it all looks fine by checking activity monitor. </div>
</div>
</div>
</div>
</blockquote>
</div>
 

<div>
<div style="font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;">--------</div>

<div style="font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;">Dan Wilcox</div>

<div style="font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://twitter.com/danomatika" target="_blank">@danomatika</a></div>

<div style="font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://danomatika.com/" target="_blank">danomatika.com</a></div>

<div style="font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://robotcowboy.com/" target="_blank">robotcowboy.com</a></div>

<div style="font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"> </div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
 

<div>
<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;">--------</div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;">Dan Wilcox</div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://twitter.com/danomatika" target="_blank">@danomatika</a></div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://danomatika.com" target="_blank">danomatika.com</a></div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"><a href="http://robotcowboy.com" target="_blank">robotcowboy.com</a></div>

<div style="color: rgb(0,0,0);font-family: Helvetica;font-size: 12.0px;font-style: normal;font-weight: normal;letter-spacing: normal;text-indent: 0.0px;text-transform: none;white-space: normal;word-spacing: 0.0px;"> </div>
</div>
</div>
_______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at <a href="https://lists.puredata.info/listinfo/pd-dev" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a></div>
</div>
</div>
</div>
</div></div></body></html>