From 076b1d266ea1d432c2ab955a17962f6774506f55 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 Dec 2017 21:16:59 +0100 Subject: audio: fix missing volume update on init and reinit This is never updated after the AO inits, so there are several cases where the volume would stay at 100%, even if it shouldn't. This affects initial volume as well as track switching or switching between files. --- player/audio.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'player/audio.c') diff --git a/player/audio.c b/player/audio.c index e92d97ffd4..965ac8f71a 100644 --- a/player/audio.c +++ b/player/audio.c @@ -538,6 +538,7 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx) #endif update_playback_speed(mpctx); + audio_update_volume(mpctx); mp_notify(mpctx, MPV_EVENT_AUDIO_RECONFIG, NULL); @@ -629,6 +630,8 @@ void reinit_audio_chain_src(struct MPContext *mpctx, struct track *track) struct mp_chmap channels; ao_get_format(mpctx->ao, &rate, &format, &channels); mp_audio_buffer_reinit_fmt(ao_c->ao_buffer, format, &channels, rate); + + audio_update_volume(mpctx); } mp_wakeup_core(mpctx); -- cgit v1.2.3