aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-03-05 15:06:16 -0800
committerChris Robinson <[email protected]>2012-03-05 15:10:02 -0800
commit6623f694767f8eb0b50f548e11108483302ea16a (patch)
treec9f39015ac0b3c9174696e525b01c5790c25c219
parentdb365746677138a1eeda0f21305ffcdb36cacd09 (diff)
Mark the device as running for capture, too
-rw-r--r--Alc/ALc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index b4c6aaa6..449160d7 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1744,7 +1744,11 @@ ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device)
return;
}
if(device->Connected)
- ALCdevice_StartCapture(device);
+ {
+ if(!(device->Flags&DEVICE_RUNNING))
+ ALCdevice_StartCapture(device);
+ device->Flags |= DEVICE_RUNNING;
+ }
UnlockLists();
ALCdevice_DecRef(device);
@@ -1760,8 +1764,9 @@ ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device)
if(device) ALCdevice_DecRef(device);
return;
}
- if(device->Connected)
+ if((device->Flags&DEVICE_RUNNING))
ALCdevice_StopCapture(device);
+ device->Flags &= ~DEVICE_RUNNING;
UnlockLists();
ALCdevice_DecRef(device);