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.
This commit is contained in:
Kevin Mitchell 2016-01-05 18:40:35 -08:00
parent cd5eb1bb19
commit a99b63db08
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}