wait until rec streams have stopped (max 5ms) before starting new ones
This commit is contained in:
1 parent
57d301018e
commit
fdd58d0728
1 file changed
+10
@@ -119,6 +119,16 @@ namespace Vocaluxe.Lib.Sound
|
|||||||
_Buffer[i].Reset();
|
_Buffer[i].Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < _recHandle.Length; i++)
|
||||||
|
{
|
||||||
|
int waitcount = 0;
|
||||||
|
while (waitcount < 5 && PortAudio.Pa_IsStreamStopped(_recHandle[i]) == PortAudio.PaError.paStreamIsNotStopped)
|
||||||
|
{
|
||||||
|
System.Threading.Thread.Sleep(1);
|
||||||
|
waitcount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < _recHandle.Length; i++)
|
for (int i = 0; i < _recHandle.Length; i++)
|
||||||
{
|
{
|
||||||
_recHandle[i] = IntPtr.Zero;
|
_recHandle[i] = IntPtr.Zero;
|
||||||
|
|||||||
Reference in new issue
Block a user