summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Mitchell <kevmitch@gmail.com>2016-01-05 18:40:35 -0800
committerKevin Mitchell <kevmitch@gmail.com>2016-01-18 20:50:54 -0800
commita99b63db08306b34ef53f5a18807c811b64491a7 (patch)
treef34664093277a689c57d0deebe3a681294308a0f
parentcd5eb1bb199253747800483203976200e7775617 (diff)
downloadmpv-a99b63db08306b34ef53f5a18807c811b64491a7.tar.bz2
mpv-a99b63db08306b34ef53f5a18807c811b64491a7.tar.xz
ao_wasapi: use share_mode value instead of raw option opt_exclusive
Previously used opt_exclusive option to decide which volume control code to run. The might not always reflect the actual state, for example if passthrough is used. Admittedly, none of the volume controls will work anyway with passthrough, but this is the right thing to do.
-rw-r--r--audio/out/ao_wasapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c
index 1c0e85b7bb..f56c853627 100644
--- a/audio/out/ao_wasapi.c
+++ b/audio/out/ao_wasapi.c
@@ -441,7 +441,7 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_OK;
}
- return state->opt_exclusive ?
+ return state->share_mode == AUDCLNT_SHAREMODE_EXCLUSIVE ?
control_exclusive(ao, cmd, arg) : control_shared(ao, cmd, arg);
}