From 6d4b4c0de3152bc2deb2df09ec3e98e032124593 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jan 2018 04:02:55 +0100 Subject: audio: add global options for resampler defaults This is part of trying to get rid of --af-defaults, and the af resample filter. It requires a complicated mechanism to set the defaults on the resample filter for backwards compatibility. --- options/options.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index c0697e8e71..1de76f53e4 100644 --- a/options/options.c +++ b/options/options.c @@ -94,6 +94,8 @@ extern const struct m_sub_options angle_conf; extern const struct m_sub_options cocoa_conf; extern const struct m_sub_options android_conf; +extern const struct m_sub_options resample_config; + static const struct m_sub_options screenshot_conf = { .opts = image_writer_opts, .size = sizeof(struct image_writer_opts), @@ -474,7 +476,6 @@ const m_option_t mp_opts[] = { OPT_INTRANGE("audio-samplerate", force_srate, UPDATE_AUDIO, 1000, 16*48000), OPT_CHANNELS("audio-channels", audio_output_channels, UPDATE_AUDIO), OPT_AUDIOFORMAT("audio-format", audio_output_format, UPDATE_AUDIO), - OPT_FLAG("audio-normalize-downmix", audio_normalize, UPDATE_AUDIO), OPT_DOUBLE("speed", playback_speed, M_OPT_RANGE, .min = 0.01, .max = 100.0), OPT_FLAG("audio-pitch-correction", pitch_correction, 0), @@ -691,6 +692,8 @@ const m_option_t mp_opts[] = { OPT_STRING("record-file", record_file, M_OPT_FILE), + OPT_SUBSTRUCT("", resample_opts, resample_config, 0), + OPT_SUBSTRUCT("", input_opts, input_config, 0), OPT_SUBSTRUCT("", vo, vo_sub_opts, 0), -- cgit v1.2.3