diff options
-rw-r--r-- | player/audio.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c index 51c84afb7a..87faa68efa 100644 --- a/player/audio.c +++ b/player/audio.c @@ -177,6 +177,7 @@ void audio_update_volume(struct MPContext *mpctx) if (opts->softvol_mute == 1) gain = 0.0; +#if HAVE_GPL if (!af_control_any_rev(ao_c->af, AF_CONTROL_SET_VOLUME, &gain)) { if (gain == 1.0) return; @@ -186,6 +187,7 @@ void audio_update_volume(struct MPContext *mpctx) && af_control_any_rev(ao_c->af, AF_CONTROL_SET_VOLUME, &gain))) MP_ERR(mpctx, "No volume control available.\n"); } +#endif } /* NOTE: Currently the balance code is seriously buggy: it always changes @@ -233,6 +235,7 @@ static int recreate_audio_filters(struct MPContext *mpctx) { assert(mpctx->ao_chain); +#if HAVE_GPL struct af_stream *afs = mpctx->ao_chain->af; if (afs->initialized < 1 && af_init(afs) < 0) goto fail; @@ -240,6 +243,7 @@ static int recreate_audio_filters(struct MPContext *mpctx) recreate_speed_filters(mpctx); if (afs->initialized < 1 && af_init(afs) < 0) goto fail; +#endif if (mpctx->opts->softvol == SOFTVOL_NO) MP_ERR(mpctx, "--softvol=no is not supported anymore.\n"); @@ -407,6 +411,7 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx) } } +#if HAVE_GPL // filter input format: same as codec's output format: afs->input = in_format; @@ -502,6 +507,7 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx) if (recreate_audio_filters(mpctx) < 0) goto init_error; +#endif update_playback_speed(mpctx); @@ -840,6 +846,7 @@ static int decode_new_frame(struct ao_chain *ao_c) } } +#if HAVE_GPL /* Try to get at least minsamples decoded+filtered samples in outbuf * (total length including possible existing data). * Return 0 on success, or negative AD_* error code. @@ -909,6 +916,7 @@ static int filter_audio(struct MPContext *mpctx, struct mp_audio_buffer *outbuf, return res; } +#endif void reload_audio_output(struct MPContext *mpctx) { |