summaryrefslogtreecommitdiff
path: root/drivers/wasapi/audio_driver_wasapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/wasapi/audio_driver_wasapi.cpp')
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 3d4979175b..a91e41b008 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -796,19 +796,18 @@ 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() {
- if (audio_input.active == true) {
+ if (audio_input.active) {
audio_input.audio_client->Stop();
audio_input.active = false;