Update deviceio test to allow explicit channel count selection.

This commit is contained in:
David Reid
2026-01-09 13:23:27 +10:00
parent 25dcbcb9cd
commit 4e28636ed8
+10 -1
View File
@@ -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)) {