[Stk] Bug in RtAudio or base class?

Gary Scavone gary@ccrma.Stanford.EDU
Tue, 12 Nov 2002 15:38:13 -0800 (PST)


Hi John,

At first I was puzzled by this because I got the same response on my
laptop.  But then I remembered that my audio driver sucks and that the
default values provided by RtWvIn are way too optimistic for a shitty
OS like windoze.  Your audio driver must behave similarly to mine.

So, if you change the line:

  input = new RtWvIn(channels);

to the following:

  input = new RtWvIn(channels, Stk::sampleRate(), 0, 512, 8);

you will hopefully get the program to work.  In the past, I had set
the higher default values in RtWvIn, but they ended up being changed
somewhere along the line before the last release.  The key change
there is the "nBuffers" value.  Within RtAudio, you set a big circular
buffer of length 512 x 8 = 4096 samples, reading in increments of 512.  
The default value was 2 buffers, which obviously doesn't work for some
drivers/systems.

Sorry about that.

--gary

On Tue, 12 Nov 2002, John Heenan wrote:

>>The record.exe executable compiled from the STK record VC++ project hangs on
>>my PC
>>
>>The example comes from STK version 4.1.1 compiled for Windows (on a Windows
>>2000 PC) with VC++
>>6.
>>
>>There is no return from a first call to the following line of record.cpp:
>>output->tickFrame( input->tickFrame() );
>>
>>input->tickFrame() in RtWnIn.cpp never returns from its call to
>>audio->tickStream(stream) in RtAudio.cpp
>>
>>Since sleep is called in a loop in tickStream, an infinite loop without
>>the usual effects on PC responsiveness is a reasonable cause.
>>
>>John Heenan
>>
>>
>>
>>
>>_______________________________________________
>>Stk mailing list
>>Stk@ccrma.stanford.edu
>>http://ccrma-mail.stanford.edu/mailman/listinfo/stk
>>

-- 
-------------------------------------------------
Gary Scavone
Center for Computer Research in Music & Acoustics
Stanford University
gary@ccrma.stanford.edu
http://www-ccrma.stanford.edu/~gary/
-------------------------------------------------