[alsa-devel] [PATCH 3/5] hdspmixer: Use constant instead of hardcoded number of cards.

Adrian Knoth adi at drcomp.erfurt.thur.de
Tue Mar 22 11:53:46 CET 2011


Again, use MAX_CARDS instead of "3", just in case MAX_CARDS should
change some day.

Signed-off-by: Adrian Knoth <adi at drcomp.erfurt.thur.de>

diff --git a/hdspmixer/src/HDSPMixerOutput.h b/hdspmixer/src/HDSPMixerOutput.h
index f38d263..2bc3d5c 100644
--- a/hdspmixer/src/HDSPMixerOutput.h
+++ b/hdspmixer/src/HDSPMixerOutput.h
@@ -52,7 +52,7 @@ private:
     HDSPMixerWindow *basew;    
     void update_child(Fl_Widget& widget);
 public:
-    HDSPMixerOutputData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
+    HDSPMixerOutputData *data[MAX_CARDS][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
     HDSPMixerFader *fader;
     HDSPMixerGain *gain;
     HDSPMixerMeter *meter;
-- 
1.7.4.1



More information about the Alsa-devel mailing list