<div>Hi Gary, by making a hybrid of playsaw.cpp and crtsine.cpp I was able to figure out why the crtsine example doesn&#39;t work on my system, which is 64-bit Ubuntu Studio. The fix held true for both Alsa and jack.<br></div>
<div><br></div><div>In playsaw.cpp the following is included:</div><div><br></div><div>RtAudio::StreamOptions options;<br>options.flags |= RTAUDIO_HOG_DEVICE;<br>  options.flags |= RTAUDIO_SCHEDULE_REALTIME;<br>#if !defined( USE_INTERLEAVED )<br>
  options.flags |= RTAUDIO_NONINTERLEAVED;<br>#endif<br><br></div><div>and the options object is passed to dac.openStream.  It turns out that the RTAUDIO_NONINTERLEAVED option is critical on my box at least. </div><div><br>
</div><div>In crtsine, no options object is made or passed. Adding the following to crtsine fixed everything and I can play back fine with any buffer size:</div><div><br></div><div> RtAudio::StreamOptions options;<br>  // these two options are optional on linux<br>
  options.flags |= RTAUDIO_HOG_DEVICE;<br>  options.flags |= RTAUDIO_SCHEDULE_REALTIME;<br>  // the below is required to get clean output on my 64-bit linux, with either jack or alsa <br>#if !defined( USE_INTERLEAVED )<br>
  options.flags |= RTAUDIO_NONINTERLEAVED;<br>#endif<br><br></div><div>...</div><div>dac.openStream( &amp;oParams, NULL, format, sampleRate, &amp;bufferFrames, &amp;tick, (void *)&amp;sine, &amp;options );</div><div>...</div>
<div><br></div><div><br></div><div>Not sure what you would like to do about the docs, but I can attest that people checking out RtAudio would love to have that note there. I&#39;m happy to update them if it meets your approval. I&#39;m just not sure how a user would know whether they should be using non-interleaved or not.</div>
<div><br></div><div>thanks</div><div>Iain</div>