From 4e28636ed88c0591bea85cdf352440bb56b868e1 Mon Sep 17 00:00:00 2001 From: David Reid Date: Fri, 9 Jan 2026 13:23:27 +1000 Subject: [PATCH] Update deviceio test to allow explicit channel count selection. --- tests/deviceio/deviceio.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/deviceio/deviceio.c b/tests/deviceio/deviceio.c index 2d9637f8..08bd951b 100644 --- a/tests/deviceio/deviceio.c +++ b/tests/deviceio/deviceio.c @@ -1,5 +1,5 @@ /* -USAGE: deviceio [input/output file] [mode] [backend] [waveform] [noise] [threading mode] [--playback-device [index]] [--capture-device [index]] [--auto] +USAGE: deviceio [input/output file] [mode] [backend] [waveform] [noise] [threading mode] [--playback-device [index]] [--capture-device [index]] [--channels [count]] [--auto] In playback mode the input file is optional, in which case a waveform or noise source will be used instead. For capture and loopback modes it must specify an output parameter, and must be specified. In duplex mode it is optional, but if specified will be an output file that @@ -516,6 +516,15 @@ int main(int argc, char** argv) continue; } + if (strcmp(argv[iarg], "--channels") == 0) { + if (iarg + 1 < argc) { + deviceChannels = (ma_uint32)atoi(argv[iarg + 1]); + iarg += 1; + } + + continue; + } + /* mode */ if (try_parse_mode(argv[iarg], &deviceType)) {