+ /* When reading the file, the first index of the analog channels
+ * can only be deduced through the "total probes" count, so the
+ * first analog index must follow the last logic one, enabled or not. */
+ if (enabled_logic_channels > 0)
+ outc->first_analog_index = logic_channels + 1;
+ else
+ outc->first_analog_index = 1;
+
+ /* Only set capturefile and probes if we will actually save logic data. */
+ if (enabled_logic_channels > 0) {
+ g_key_file_set_string(meta, devgroup, "capturefile", "logic-1");
+ g_key_file_set_integer(meta, devgroup, "total probes", logic_channels);
+ }
+
+ s = sr_samplerate_string(outc->samplerate);
+ g_key_file_set_string(meta, devgroup, "samplerate", s);
+ g_free(s);
+
+ g_key_file_set_integer(meta, devgroup, "total analog", enabled_analog_channels);