audio_mixer.reset(new AudioMixer(num_cards, video_inputs.size()));
httpd.add_endpoint("/channels", bind(&Mixer::get_channels_json, this), HTTPD::ALLOW_ALL_ORIGINS);
- for (int channel_idx = 2; channel_idx < theme->get_num_channels(); ++channel_idx) {
+ for (int channel_idx = 0; channel_idx < theme->get_num_channels(); ++channel_idx) {
char url[256];
- snprintf(url, sizeof(url), "/channels/%d/color", channel_idx);
- httpd.add_endpoint(url, bind(&Mixer::get_channel_color_http, this, unsigned(channel_idx)), HTTPD::ALLOW_ALL_ORIGINS);
+ snprintf(url, sizeof(url), "/channels/%d/color", channel_idx + 2);
+ httpd.add_endpoint(url, bind(&Mixer::get_channel_color_http, this, unsigned(channel_idx + 2)), HTTPD::ALLOW_ALL_ORIGINS);
}
// Start listening for clients only once VideoEncoder has written its header, if any.