WARNING: PortAudio is NOT thread safe. DO NOT call PortAudio from multiple threads without synchronization. This test uses PA in an ILLEGAL WAY in order to try to flush out potential hang bugs. The test calls Pa_WriteStream() and Pa_StopStream() simultaneously from separate threads in order to try to cause Pa_StopStream() to hang. In the main thread we write to the stream in a loop. Then try stopping PA from another thread to see if it hangs.
- Note
- : Do not expect this test to pass. The test is only here as a debugging aid for hang bugs. Since this test uses PA in an illegal way, it may fail for reasons that are not PA bugs.
References Pa_GetStreamTime(), and Pa_StopStream().