[Stk] Bug in RtAudio or base class?

Gary Scavone gary@ccrma.Stanford.EDU
Tue, 19 Nov 2002 10:09:09 -0800 (PST)


Hi John,

>>Regrettably the effects tcl GUI demo is still not working. Yes it did work
>>before driver upgrade.

That is very strange.  The "effects" project uses a soundcard in
duplex mode, so it is using both the input and output routines in
RtAudio simultaneously (as opposed to the "play" program which only
uses output routines and the "record" program which only uses input
routines).  This is typically the most problematic behavior to get
working.  I'm sorry I did not understand before that duplex mode was
working ... that would pretty much have ruled out any problems with
your soundcard driver.  What sort of error message do you get when you 
attempt to run the "effects" program?

>>I have recompiled with the new WvIn.cpp and WvOut.cpp files you sent me and
>>left record.cpp with the original line
>>input = new RtWvIn(channels);
>>
>>Windows regards it as the responsibility of software to set card
>>input at 8 or 16 bit. However I did not need to make additions to
>>your software as I used Windows Sound Recorder to set the card at 16
>>bits, for recording and playback prior to using record.exe from the
>>STK.

Both the RtWvIn and RtWvOut classes "ask" RtAudio to supply them with
floating-point data.  Since DirectSound doesn't support floating-point
data (nor does your soundcard in all likelihood), RtAudio will attempt
to set the highest resolution data format and then automatically 
convert that to floating point.  So, RtAudio will set your card for 
16-bit if supported, or 8-bit if not.

>>What can be set from the system are two audio driver parameters for both
>>recording and playback.  These are 'sample rate conversion quality' and
>>'acceleration'. For both recording and playback sample rate conversion
>>quality was left at 'good' (the lowest of three settings'. There are four
>>acceleration settings. These are
>>None - Emulation only
>>Basic Acceleration
>>Standard Acceleration: use this setting to enable only standard DirectSound
>>acceleration features. (Recommended)
>>Full acceleration
>>
>>I got best results with the non recommended setting: Basic Acceleration.
>>
>>The best results do not include echoing or reverberation but do
>>include what superficially sounds like as if the recording level had
>>been left too high. I cannot eliminate this by reducing the
>>recording level.

I'll assume that playback is working correctly for you now (and that 
the WvOut fix I sent last week now allows you to correctly read and 
play 8-bit files) ... please let me know if that is not the case.

What happens when you run the "io" example program?  That tests duplex
mode.

>From what I understand, you are still having problems with the 
"record" example?  On my Windows system, there is an "Advanced" button 
below the Mic volume control.  When I click on that, there is a 20dB 
setting which can be checked/unchecked.  If you have that, have to 
tried turning that off?

If there remain problems, my next suggested step would be to download 
the RtAudio distribution and run the tests there:

  http://www-ccrma.stanford.edu/~gary/rtaudio/

Each test program allows you to set the data format (#define
statements at the top of each), so we could better determine whether
the problems you are having are coming from RtAudio or other STK
classes.  If you're into this, let me know and I'll provide more
explicit recommended tests to run.

--gary