mirror of
https://github.com/mpv-player/mpv
synced 2025-02-27 10:50:53 +00:00
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.
This commit is contained in:
parent
2e24f5f1b5
commit
076b1d266e
@ -538,6 +538,7 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
update_playback_speed(mpctx);
|
update_playback_speed(mpctx);
|
||||||
|
audio_update_volume(mpctx);
|
||||||
|
|
||||||
mp_notify(mpctx, MPV_EVENT_AUDIO_RECONFIG, NULL);
|
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;
|
struct mp_chmap channels;
|
||||||
ao_get_format(mpctx->ao, &rate, &format, &channels);
|
ao_get_format(mpctx->ao, &rate, &format, &channels);
|
||||||
mp_audio_buffer_reinit_fmt(ao_c->ao_buffer, format, &channels, rate);
|
mp_audio_buffer_reinit_fmt(ao_c->ao_buffer, format, &channels, rate);
|
||||||
|
|
||||||
|
audio_update_volume(mpctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
mp_wakeup_core(mpctx);
|
mp_wakeup_core(mpctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user