Hello,<div><br></div><div>I&#39;m currently calling ADSR::keyOn from my UI thread, and calling ADSR::tick() from an IO callback thread.</div><div>This is bad, right? This class is not thread-safe, and these methods both need to be called from the same thread, correct?</div>
<div><br clear="all">My application has a very occasional, impossible to reproduce bug which results in all audio output completely stopping. I just managed to see the bug with the debugger hooked up, and traced it back to NaN&#39;s originating from ADSR. My guess is that ADSR was thrown in to this faulty state by a collision between my two threads. Anyone have any other ideas of what it could be, or does my hypothesis sound like a good one?</div>
<div><br></div><div>Is there any preferred way to trigger an ADSR from an external thread? Seems to me that a message queue approach may be the easiest, and won&#39;t result in any blocking of the audio thread.</div><div>
<br></div><div>thanks,</div><div><br></div><div>-Morgan</div><div><br>-- <br><font color="#999999">================================</font><div><font color="#999999">Web:</font><br><div><a href="http://www.morganpackard.com" target="_blank"><font color="#333333">http://www.morganpackard.com</font></a></div>
<div><br></div><div><font color="#999999">Music/Art:</font></div><div><font color="#333333">Latest album: </font><a href="http://www.anticipaterecordings.com/releases/ANT_011/index.php" target="_blank"><font color="#333333">Moment Again Elsewhere</font></a></div>
</div><div><font color="#333333">iOS app </font><a href="http://itunes.apple.com/us/app/thicket/id364824621?mt=8" target="_blank"><font color="#333333">Thicket</font></a><font color="#333333"> available on iTunes store</font>.</div>
<div><span style="color:rgb(153, 153, 153)">================================</span></div><br>
</div>