From 054c02ad64a62dd8393bde0fd73edeaa71048722 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 29 Jan 2018 06:08:52 +0100 Subject: ao_null: add --ao-null-format option for debugging Helpful especially to test spdif fallback and so on. --- audio/out/ao_null.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'audio') diff --git a/audio/out/ao_null.c b/audio/out/ao_null.c index 29d88d4670..3880ee8aa4 100644 --- a/audio/out/ao_null.c +++ b/audio/out/ao_null.c @@ -58,6 +58,7 @@ struct priv { int outburst; // samples struct m_channels channel_layouts; + int format; }; static void drain(struct ao *ao) @@ -88,6 +89,9 @@ static int init(struct ao *ao) { struct priv *priv = ao->priv; + if (priv->format) + ao->format = priv->format; + ao->untimed = priv->untimed; struct mp_chmap_sel sel = {.tmp = ao}; @@ -241,6 +245,7 @@ const struct ao_driver audio_out_null = { OPT_FLAG("broken-eof", broken_eof, 0), OPT_FLAG("broken-delay", broken_delay, 0), OPT_CHANNELS("channel-layouts", channel_layouts, 0), + OPT_AUDIOFORMAT("format", format, 0), {0} }, .options_prefix = "ao-null", -- cgit v1.2.3