From f20aa405cb09031e636db597fd22eb56c348332e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 22 Jul 2020 17:26:14 +0200 Subject: [PATCH] pw-cat: fallback to default channel map in record If not otherwise specified, use the default channelmap when recording. --- src/tools/pw-cat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/pw-cat.c b/src/tools/pw-cat.c index 952fb62ce..3d66a3966 100644 --- a/src/tools/pw-cat.c +++ b/src/tools/pw-cat.c @@ -1077,6 +1077,8 @@ static int setup_sndfile(struct data *data) data->channels = DEFAULT_CHANNELS; if (data->rate == 0) data->rate = DEFAULT_RATE; + if (data->channelmap.n_channels == 0) + channelmap_default(&data->channelmap, data->channels); memset(&info, 0, sizeof(info)); info.samplerate = data->rate;