[Stk] crtsine example fixed for linux, can we update the docs?

Iain Duncan iainduncanlists at gmail.com
Wed Sep 28 11:35:58 PDT 2011


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.

iain

On Wed, Sep 28, 2011 at 9:06 AM, Gary Scavone <gary at ccrma.stanford.edu>wrote:

> Hi Iain,
>
> 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.
>
> 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.
>
> Thus, I'm guessing this might be a hardware specific issue.  What soundcard
> were you testing on?
>
> Regards,
>
> --gary
>
> On 2011-09-11, at 4:48 PM, Iain Duncan wrote:
>
> > Hi Gary, by making a hybrid of playsaw.cpp and crtsine.cpp I was able to
> figure out why the crtsine example doesn't work on my system, which is
> 64-bit Ubuntu Studio. The fix held true for both Alsa and jack.
> >
> > In playsaw.cpp the following is included:
> >
> > RtAudio::StreamOptions options;
> > options.flags |= RTAUDIO_HOG_DEVICE;
> > options.flags |= RTAUDIO_SCHEDULE_REALTIME;
> > #if !defined( USE_INTERLEAVED )
> > options.flags |= RTAUDIO_NONINTERLEAVED;
> > #endif
> >
> > and the options object is passed to dac.openStream.  It turns out that
> the RTAUDIO_NONINTERLEAVED option is critical on my box at least.
> >
> > 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:
> >
> > RtAudio::StreamOptions options;
> > // these two options are optional on linux
> > options.flags |= RTAUDIO_HOG_DEVICE;
> > options.flags |= RTAUDIO_SCHEDULE_REALTIME;
> > // the below is required to get clean output on my 64-bit linux, with
> either jack or alsa
> > #if !defined( USE_INTERLEAVED )
> > options.flags |= RTAUDIO_NONINTERLEAVED;
> > #endif
> >
> > ...
> > dac.openStream( &oParams, NULL, format, sampleRate, &bufferFrames, &tick,
> (void *)&sine, &options );
> > ...
> >
> >
> > 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'm happy to
> update them if it meets your approval. I'm just not sure how a user would
> know whether they should be using non-interleaved or not.
> >
> > thanks
> > Iain
> > _______________________________________________
> > Stk mailing list
> > Stk at ccrma.stanford.edu
> > http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20110928/bf706f52/attachment.html 


More information about the Stk mailing list