[Stk] Trouble with RtApiDs::stopStream

chaos at corrupt.net chaos at corrupt.net
Fri Apr 30 03:50:09 PDT 2004


I got around this by just putting the cleanup of the RtWvOut into the same thread
that calls the ticks on it. But if anyone knows what this problem could have
been, please share. I'm curious.

Jim

On Fri, Apr 30, 2004 at 04:07:57AM -0400, chaos at corrupt.net wrote:
> I'm trying a modified version of the Instruments tutorial on Windows. What
> I've changed is that I've put the loop that plays the instrument in a separate
> thread, and I've stored pointers to the instrument and RtWvOut stream as
> member variables in a class.
> 
> When the class is destructed, I try to delete the instrument RtWvOut
> pointers. The problem is that when the dtor of RtWvOut calls
> RtApiDs::stopStream, it gets stuck in the loop with the comment:
> 
> // Check whether the entire write region is behind the play pointer.
> 
> (Line 6125 in RtAudio.cpp.) The currentPos never seems to be updated.
> 
> 
> When I move the destruction of the RtWvOut stream to the thread function,
> right after the instrument-playing loop, it works with no problem.
> 
> 
> Ever run into this? Any clues?
> 
> _______________________________________________
> Stk mailing list
> Stk at ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk




More information about the Stk mailing list