[Stk] Realtime Effect Processing Using Callback
BEN SHEPHERD
benshep at roadrunner.com
Mon Jan 5 06:56:35 PST 2009
>
> I'm attempting to read from an input, process with a delay, and
> output in realtime and my program stops when delay->tick is called
> with an "access segmentation" or memory error. I'm on Windows XP,
> using ASIO only. I have been able to successfully use the Duplex
> program which uses memcpy to copy the inputBuffer to outputBuffer.
> I've tried different classes including Chorus but with the same
> result. I apologize in advance if I'm missing something simple, but
> I've poured through all the documentation and examples I could find.
>
> Thanks,
> Ben
>
> int tick( void *outputBuffer, void *inputBuffer, unsigned int
> nBufferFrames,
> double streamTime, RtAudioStreamStatus status, void
> *dataPointer )
> {
> Delay *delay = (Delay *) dataPointer;
> StkFloat *oSamples = (StkFloat *) outputBuffer;
> StkFloat *iSamples = (StkFloat *) inputBuffer;
>
> for ( int i=0; i<nBufferFrames; i++ )
> *oSamples++ = delay->tick(*iSamples++);
>
> return 0;
> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ccrma-mail.stanford.edu/pipermail/stk/attachments/20090105/c5354ea2/attachment.html
More information about the Stk
mailing list