[Stk] Re: buffering advice

Conor forward@forwind.net
Tue, 17 May 2005 00:29:08 -0700


well maybe not so much hints, but i don't want to be 'going around the 
world for sport' i.e. if this functionality is inherent in some other 
class of the API then i should use it.

Conor wrote:

> Hi,
>
> I was wondering if someone could quickly point me in the appropriate 
> direction.
> i was looking to implement a real time responsive instrument with STK 
> but am a little confused which threading model to use.
>
> This is the way i thought it should work...
> The app ideally will listen on the audio in and fill a buffer, when a 
> certain 'window' has been filled the buffer it should notify(send an 
> event) to another thread to accept this window of data, process it and 
> send it the output. The main idea is that this window should be 
> flexible. The thread that listens for input should work entirely 
> independent of the processing/output thread and should use rtwavin. 
> While the second thread which writes to the output buffer should use 
> rtwavout. the reason for the two threads is so as the processing 
> (which should be quite intensive) can be carried out independent of 
> the input.
>
> Initially I thought okay this can be done in the standard 
> multithreaded scenario using CRT library using the model i discussed 
> above.
> now i'm not so sure,
> does anyone have any hints?
>
> Conor
>
>
>
>