[Stk] Trouble with RtApiDs::stopStream

chaos@corrupt.net chaos@corrupt.net
Fri, 30 Apr 2004 06:50:09 -0400


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@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@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/stk