snprintf(w->window_title, FL_PATH_MAX, "HDSPMixer");
w->label(w->window_title);
w->resetMixer();
- while (w->cards[i] != NULL) {
+ while (i < MAX_CARDS && w->cards[i] != NULL) {
w->restoreDefaults(i++);
}
w->inputs->buttons->presets->preset_change(1);
if ((file = fopen(file_name, "r")) == NULL) {
int i = 0;
fl_alert("Error opening file %s for reading", file_name);
- while (cards[i] != NULL) {
+ while (i < MAX_CARDS && cards[i] != NULL) {
restoreDefaults(i++);
}
inputs->buttons->presets->preset_change(1);
setup = new HDSPMixerSetup(400, 260, "Level Meters Setup", this);
about = new HDSPMixerAbout(360, 300, "About HDSPMixer", this);
i = 0;
- while (cards[i] != NULL) {
+ while (i < MAX_CARDS && cards[i] != NULL) {
cards[i++]->initializeCard(this);
}
size_range(MIN_WIDTH, MIN_HEIGHT, cards[current_card]->window_width, cards[current_card]->window_height);
} else {
printf("Initializing default presets\n");
i = 0;
- while (cards[i] != NULL) {
+ while (i < MAX_CARDS && cards[i] != NULL) {
restoreDefaults(i++);
}
inputs->buttons->presets->preset_change(1);
Fl::add_handler(handler_cb);
Fl::add_timeout(0.030, readregisters_cb, this);
i = 0;
- while (cards[i] != NULL)
+ while (i < MAX_CARDS && cards[i] != NULL)
inputs->buttons->cardselector->ActivateCard (i++);
}
Fl_Scroll *scroll;
HDSPMixerSetup *setup;
HDSPMixerAbout *about;
- HDSPMixerPresetData *data[3][3][8]; /* data[card number][mode(ss/ds/qs)][preset number] */
- HDSPMixerCard *cards[3];
+ HDSPMixerPresetData *data[MAX_CARDS][3][8]; /* data[card number][mode(ss/ds/qs)][preset number] */
+ HDSPMixerCard *cards[MAX_CARDS];
HDSPMixerInputs *inputs;
HDSPMixerPlaybacks *playbacks;
HDSPMixerOutputs *outputs;