Don't flag capture device as no-longer-started until we've stopped all i/o.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 04 Dec 2010 00:23:59 -0500
changeset 89 8f9a1534b607
parent 88 eef6b0b69408
child 90 a637700bc841
Don't flag capture device as no-longer-started until we've stopped all i/o.

Audio Hijack Pro (or maybe bad luck unrelated to it) appears to make the
capture callback pump one more time here, so the callback's assertion that
checks this flag needs it to remain sane.
osx/alContext.c
--- a/osx/alContext.c	Sun Jun 29 11:56:37 2008 -0400
+++ b/osx/alContext.c	Sat Dec 04 00:23:59 2010 -0500
@@ -644,8 +644,8 @@
         __alcSetError(dev, ALC_INVALID_DEVICE);
     else if (dev->capture.started)
     {
+        __alcStopCaptureIO(dev);
         dev->capture.started = AL_FALSE;
-        __alcStopCaptureIO(dev);
     } // else if
 } // alcCaptureStart