diff options
author | Alexander Levin <al.le@rockbox.org> | 2009-07-13 14:20:39 +0000 |
---|---|---|
committer | Alexander Levin <al.le@rockbox.org> | 2009-07-13 14:20:39 +0000 |
commit | f448fa4655256110f58acfe99b29a467baf13966 (patch) | |
tree | d828bcfcf88c9d4bd360123111412070122d04c4 /apps | |
parent | afad93ae026a386d5e0b2856ef62120bb3ab54b3 (diff) | |
download | rockbox-f448fa4655256110f58acfe99b29a467baf13966.tar.gz rockbox-f448fa4655256110f58acfe99b29a467baf13966.zip |
Correctly compute the array size regardless of the element type
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21839 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/pitchscreen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/gui/pitchscreen.c b/apps/gui/pitchscreen.c index 2d0412d822..204a1cd35f 100644 --- a/apps/gui/pitchscreen.c +++ b/apps/gui/pitchscreen.c | |||
@@ -115,7 +115,7 @@ static const int semitone_table[] = | |||
115 | TO_INT_WITH_PRECISION(200.0000000) /* Octave higher */ | 115 | TO_INT_WITH_PRECISION(200.0000000) /* Octave higher */ |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #define NUM_SEMITONES ((int)(sizeof(semitone_table) / sizeof(int))) | 118 | #define NUM_SEMITONES ((int)(sizeof(semitone_table)/sizeof(semitone_table[0]))) |
119 | #define SEMITONE_END (NUM_SEMITONES/2) | 119 | #define SEMITONE_END (NUM_SEMITONES/2) |
120 | #define SEMITONE_START (-SEMITONE_END) | 120 | #define SEMITONE_START (-SEMITONE_END) |
121 | 121 | ||
@@ -140,7 +140,7 @@ static const int cent_interp[] = | |||
140 | 140 | ||
141 | /* Number of cents between entries in the cent_interp table */ | 141 | /* Number of cents between entries in the cent_interp table */ |
142 | #define CENT_INTERP_INTERVAL 20 | 142 | #define CENT_INTERP_INTERVAL 20 |
143 | #define CENT_INTERP_NUM ((int)(sizeof(cent_interp)/sizeof(int))) | 143 | #define CENT_INTERP_NUM ((int)(sizeof(cent_interp)/sizeof(cent_interp[0]))) |
144 | 144 | ||
145 | /* This stores whether the pitch and speed are at their own limits */ | 145 | /* This stores whether the pitch and speed are at their own limits */ |
146 | /* or that of the timestretching algorithm */ | 146 | /* or that of the timestretching algorithm */ |