diff options
author | Dudemanguy <random342@airmail.cc> | 2024-03-01 09:20:15 -0600 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2024-03-01 09:20:15 -0600 |
commit | 4560d93bf0f2494f4f1344ac1840801911be7319 (patch) | |
tree | f577a83a21356ea4e034d0f5d80fb2fbad48fda5 /player/audio.c | |
parent | 8ba6d8f7a9aa3b049b4706e3f26bb614e95f965a (diff) | |
download | mpv-4560d93bf0f2494f4f1344ac1840801911be7319.tar.bz2 mpv-4560d93bf0f2494f4f1344ac1840801911be7319.tar.xz |
Revert "player: add ao-volume option, to set the system volume at startup"
Ended up being a bad idea. As a property, this inherently has more
functionality and the tradeoff of being able to do --ao-volume wasn't
worth it.
This reverts commit 58ed620c064971535e60778612777750aa5e2f4d.
Diffstat (limited to 'player/audio.c')
-rw-r--r-- | player/audio.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/player/audio.c b/player/audio.c index f5379ca59b..7a37c0d2f2 100644 --- a/player/audio.c +++ b/player/audio.c @@ -182,19 +182,6 @@ void audio_update_volume(struct MPContext *mpctx) ao_set_gain(ao_c->ao, gain); } -// Called when opts->ao_volume were changed. -void audio_update_ao_volume(struct MPContext *mpctx) -{ - struct MPOpts *opts = mpctx->opts; - struct ao *ao = mpctx->ao; - float vol = opts->ao_volume; - if (!ao || vol < 0) - return; - - ao_control(ao, AOCONTROL_SET_VOLUME, &vol); -} - - // Call this if opts->playback_speed or mpctx->speed_factor_* change. void update_playback_speed(struct MPContext *mpctx) { @@ -348,7 +335,6 @@ static void ao_chain_set_ao(struct ao_chain *ao_c, struct ao *ao) // Make sure filtering never stops with frames stuck in access filter. mp_filter_set_high_priority(ao_c->queue_filter, true); audio_update_volume(ao_c->mpctx); - audio_update_ao_volume(ao_c->mpctx); } if (ao_c->filter->ao_needs_update) @@ -607,10 +593,8 @@ void reinit_audio_chain_src(struct MPContext *mpctx, struct track *track) if (recreate_audio_filters(mpctx) < 0) goto init_error; - if (mpctx->ao) { + if (mpctx->ao) audio_update_volume(mpctx); - audio_update_ao_volume(mpctx); - } mp_wakeup_core(mpctx); return; |