diff options
author | sunpenghao <sunpenghao1997@outlook.com> | 2024-02-13 15:32:04 +0800 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-02-24 05:26:56 +0000 |
commit | 2cc3bc12dbb51ea63cc9ec670bfaf3a574df2fdc (patch) | |
tree | 9699305eedf237022f4c525ce38b50440e5f91de /audio | |
parent | 6863eefc3d1d683a08f56aeaca0b4706672f2447 (diff) | |
download | mpv-2cc3bc12dbb51ea63cc9ec670bfaf3a574df2fdc.tar.bz2 mpv-2cc3bc12dbb51ea63cc9ec670bfaf3a574df2fdc.tar.xz |
ao_wasapi: scale queried AO volume to (0, 100)
This was done for `AOCONTROL_SET_VOLUME` but not `AOCONTROL_GET_VOLUME`.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/out/ao_wasapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c index c6abb16f80..ce9581649f 100644 --- a/audio/out/ao_wasapi.c +++ b/audio/out/ao_wasapi.c @@ -348,7 +348,7 @@ static int thread_control_exclusive(struct ao *ao, enum aocontrol cmd, void *arg case AOCONTROL_GET_VOLUME: IAudioEndpointVolume_GetMasterVolumeLevelScalar( state->pEndpointVolume, &volume); - *(float *)arg = volume; + *(float *)arg = volume * 100.f; return CONTROL_OK; case AOCONTROL_SET_VOLUME: volume = (*(float *)arg) / 100.f; @@ -378,7 +378,7 @@ static int thread_control_shared(struct ao *ao, enum aocontrol cmd, void *arg) switch(cmd) { case AOCONTROL_GET_VOLUME: ISimpleAudioVolume_GetMasterVolume(state->pAudioVolume, &volume); - *(float *)arg = volume; + *(float *)arg = volume * 100.f; return CONTROL_OK; case AOCONTROL_SET_VOLUME: volume = (*(float *)arg) / 100.f; |