<div>I was using an m-audio Delta 66, which is pretty well supported for linux, and am running Ubuntu Studio 8. I had the same problem using either ALSA or JACK for output. If it would help, I could test it with another soundcard here, I have a firewire interface too ( Presonus Firepod ), though it has jack support only.<br>
</div><div><br></div><div>iain</div><br><div class="gmail_quote">On Wed, Sep 28, 2011 at 9:06 AM, Gary Scavone <span dir="ltr">&lt;<a href="mailto:gary@ccrma.stanford.edu">gary@ccrma.stanford.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Iain,<br>
<br>
I finally got around to testing this and I found no problem using interleaved or non-interleaved audio on my 64-bit linux system.  Note that the issue here is primarily the RtAudio class, and not any STK classes.<br>
<br>
I tested interleaved and non-interleaved audio output using both the ALSA and JACK APIs.  My linux distribution is Fedora 11.  My audio hardware is an Intel chipset on the motherboard and an RME HDSP 9632 card.<br>
<br>
Thus, I&#39;m guessing this might be a hardware specific issue.  What soundcard were you testing on?<br>
<br>
Regards,<br>
<br>
--gary<br>
<div><div class="h5"><br>
On 2011-09-11, at 4:48 PM, Iain Duncan wrote:<br>
<br>
&gt; 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>

&gt;<br>
&gt; In playsaw.cpp the following is included:<br>
&gt;<br>
&gt; RtAudio::StreamOptions options;<br>
&gt; options.flags |= RTAUDIO_HOG_DEVICE;<br>
&gt; options.flags |= RTAUDIO_SCHEDULE_REALTIME;<br>
&gt; #if !defined( USE_INTERLEAVED )<br>
&gt; options.flags |= RTAUDIO_NONINTERLEAVED;<br>
&gt; #endif<br>
&gt;<br>
&gt; and the options object is passed to dac.openStream.  It turns out that the RTAUDIO_NONINTERLEAVED option is critical on my box at least.<br>
&gt;<br>
&gt; 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:<br>
&gt;<br>
&gt; RtAudio::StreamOptions options;<br>
&gt; // these two options are optional on linux<br>
&gt; options.flags |= RTAUDIO_HOG_DEVICE;<br>
&gt; options.flags |= RTAUDIO_SCHEDULE_REALTIME;<br>
&gt; // the below is required to get clean output on my 64-bit linux, with either jack or alsa<br>
&gt; #if !defined( USE_INTERLEAVED )<br>
&gt; options.flags |= RTAUDIO_NONINTERLEAVED;<br>
&gt; #endif<br>
&gt;<br>
&gt; ...<br>
&gt; dac.openStream( &amp;oParams, NULL, format, sampleRate, &amp;bufferFrames, &amp;tick, (void *)&amp;sine, &amp;options );<br>
&gt; ...<br>
&gt;<br>
&gt;<br>
&gt; 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.<br>

&gt;<br>
&gt; thanks<br>
&gt; Iain<br>
</div></div>&gt; _______________________________________________<br>
&gt; Stk mailing list<br>
&gt; <a href="mailto:Stk@ccrma.stanford.edu">Stk@ccrma.stanford.edu</a><br>
&gt; <a href="http://ccrma-mail.stanford.edu/mailman/listinfo/stk" target="_blank">http://ccrma-mail.stanford.edu/mailman/listinfo/stk</a><br>
<br>
</blockquote></div><br>