[Stk] Tutorial out of date?

Ross Clement rossclement at gmail.com
Wed Jun 18 01:25:45 PDT 2008


On Tue, Jun 17, 2008 at 5:13 PM, Perry R Cook <prc at cs.princeton.edu> wrote:

> Each version/flavor of Intel/Audio hardware
> might require playing with buffer sizes and
> possibly using blocking vs. callback.  Try
> increasing the buffersize.
>
> PRC
>

For callback, I tried increasing the buffer size all the way up to 65536
frames/buffer. I also tried blocking with RtWvOut. Both still gave crackling
sound.

I would prefer not to have to backtrack to the 4.2.1 version. Can anyone
recommend what I might try?

Portaudio V19 works fine on my machine with the Intel sound hardware. I
could of course write my programs using portaudio for input/output, but this
is clearly far from ideal.

This is the modified code in my crtsine.cpp

  // Figure out how many bytes in an StkFloat and setup the RtAudio stream.
  RtAudio::StreamParameters parameters;
  parameters.deviceId = dac.getDefaultOutputDevice();
  parameters.nChannels = 2;
  RtAudioFormat format = ( sizeof(StkFloat) == 8 ) ? RTAUDIO_FLOAT64 :
RTAUDIO_FLOAT32;
  unsigned int bufferFrames = RT_BUFFER_SIZE * 128;

  std::cout << "bufferFrames is " << bufferFrames << std::endl;

 try {
    dac.openStream( &parameters, NULL, format, (unsigned
int)Stk::sampleRate(), &bufferFrames, &tick, (void *)&sine );
  }

Cheers,

Ross Clement
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20080618/18bb320e/attachment.html 


More information about the Stk mailing list