0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

ao_wasapi: only report per-app volume in shared mode

otherwise we were incorrectly adjusting the hardware master volume
in exclusive mode with softvol=auto
This commit is contained in:
Kevin Mitchell 2015-11-19 05:11:45 -08:00
parent a6fb80baa4
commit e10727baa7

View File

@ -341,7 +341,8 @@ static int control(struct ao *ao, enum aocontrol cmd, void *arg)
return CONTROL_OK; return CONTROL_OK;
case AOCONTROL_HAS_PER_APP_VOLUME: case AOCONTROL_HAS_PER_APP_VOLUME:
return CONTROL_TRUE; return state->share_mode == AUDCLNT_SHAREMODE_SHARED ?
CONTROL_TRUE : CONTROL_FALSE;
case AOCONTROL_UPDATE_STREAM_TITLE: { case AOCONTROL_UPDATE_STREAM_TITLE: {
MP_VERBOSE(state, "Updating stream title to \"%s\"\n", (char*)arg); MP_VERBOSE(state, "Updating stream title to \"%s\"\n", (char*)arg);
wchar_t *title = mp_from_utf8(NULL, (char*)arg); wchar_t *title = mp_from_utf8(NULL, (char*)arg);