summaryrefslogtreecommitdiff
path: root/drivers/wasapi
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2018-10-06 16:20:41 -0400
committerAaron Franke <arnfranke@yahoo.com>2018-10-06 16:20:41 -0400
commit4f7b33cdcfdcbc11bcc506018dff1b06db3cf3f6 (patch)
tree688f040a857c59629101076487c097da6bc5dff3 /drivers/wasapi
parent37386f112bafa9c4e94c342f6d5f04392a5623f7 (diff)
Remove redundant "== false" code
Some of this code has been re-organized. f
Diffstat (limited to 'drivers/wasapi')
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 566940b872..a91e41b008 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -796,14 +796,13 @@ Error AudioDriverWASAPI::capture_start() {
return err;
}
- if (audio_input.active == false) {
- audio_input.audio_client->Start();
- audio_input.active = true;
-
- return OK;
+ if (audio_input.active) {
+ return FAILED;
}
- return FAILED;
+ audio_input.audio_client->Start();
+ audio_input.active = true;
+ return OK;
}
Error AudioDriverWASAPI::capture_stop() {