hdspmixer: Don't use hardcoded number of cards.
authorAdrian Knoth <adi@drcomp.erfurt.thur.de>
Mon, 28 Feb 2011 13:56:08 +0000 (14:56 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 28 Feb 2011 14:55:23 +0000 (15:55 +0100)
We have introduced MAX_CARDS before to make the code more safe and
extendable, so it's just sane to use it all over the place.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

hdspmixer/src/HDSPMixerIOMixer.h

index b440007..2ec7f05 100644 (file)
@@ -56,7 +56,7 @@ private:
        std::stringstream channel_name;
     void update_child(Fl_Widget &widget);
 public:
-    HDSPMixerStripData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
+    HDSPMixerStripData *data[MAX_CARDS][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
     HDSPMixerPan *pan;
     HDSPMixerFader *fader;
     HDSPMixerPeak *peak;