From fce994bdc473e73873fb8e9f4841004d073f43b4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 May 2021 14:48:52 +0200 Subject: Revert "audio: set audio chain ao on reinit" This reverts commit 3239e41277173bace5ecc2a22910c4660642429c. I'm fairly sure this is wrong, and my next commit should fix it properly. I'm not really sure, though. Normally, the AO is set again by reinit_audio_filters_and_output() after the new audio chain has decoded a frame and knows the new format. The reason replaygain (and apparently the thing the reverted commit tried to fix) didn't work is because they work asynchronously to the audio played by the AO (i.e. buggy and hard to fix). --- player/audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'player') diff --git a/player/audio.c b/player/audio.c index aa7647428c..c468df6719 100644 --- a/player/audio.c +++ b/player/audio.c @@ -568,10 +568,8 @@ void reinit_audio_chain_src(struct MPContext *mpctx, struct track *track) if (recreate_audio_filters(mpctx) < 0) goto init_error; - if (mpctx->ao) { - ao_chain_set_ao(ao_c, mpctx->ao); + if (mpctx->ao) audio_update_volume(mpctx); - } mp_wakeup_core(mpctx); return; -- cgit v1.2.3