This was originally done as an optimization in combination with a list
reversal which has since been removed from the code. Thus, un-reverse
the channels so that the UI lists them in the correct order again.
devc->samplerate = DEFAULT_SAMPLERATE;
sdi->priv = devc;
devc->samplerate = DEFAULT_SAMPLERATE;
sdi->priv = devc;
- for (i = NUM_CHANNELS; i > 0; --i) {
+ for (i = 0; i < NUM_CHANNELS; ++i) {
/* The LWLA series simply number channels from CH1 to CHxx. */
/* The LWLA series simply number channels from CH1 to CHxx. */
- g_snprintf(name, sizeof(name), "CH%d", i);
- sr_channel_new(sdi, i - 1, SR_CHANNEL_LOGIC, TRUE, name);
+ g_snprintf(name, sizeof(name), "CH%d", i + 1);
+ sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, name);