History

Use ARRAY_LEN macro in sinc_set_converter().

Erik de Castro Lopo committed 22 years ago

Commit 40148911 parent ef823b11 file · +6 −6Browse files

Unified · Split

src/src_sinc.c+6−6
@@ -173,26 +173,26 @@ sinc_set_converter (SRC_PRIVATE *psrc, int src_enum) · 172 unmodified lines
173173 switch (src_enum)
174174 { case SRC_SINC_BEST_QUALITY :
175175 temp_filter.coeffs = high_qual_coeffs ;
176− temp_filter.coeff_half_len = (sizeof (high_qual_coeffs) / sizeof (coeff_t)) - 1 ;
176+ temp_filter.coeff_half_len = ARRAY_LEN (high_qual_coeffs) - 1 ;
177177 temp_filter.index_inc = 128 ;
178178 temp_filter.has_diffs = SRC_FALSE ;
179− temp_filter.coeff_len = sizeof (high_qual_coeffs) / sizeof (coeff_t) ;
179+ temp_filter.coeff_len = ARRAY_LEN (high_qual_coeffs) ;
180180 break ;
181181
182182 case SRC_SINC_MEDIUM_QUALITY :
183183 temp_filter.coeffs = mid_qual_coeffs ;
184− temp_filter.coeff_half_len = (sizeof (mid_qual_coeffs) / sizeof (coeff_t)) - 1 ;
184+ temp_filter.coeff_half_len = ARRAY_LEN (mid_qual_coeffs) - 1 ;
185185 temp_filter.index_inc = 128 ;
186186 temp_filter.has_diffs = SRC_FALSE ;
187− temp_filter.coeff_len = sizeof (mid_qual_coeffs) / sizeof (coeff_t) ;
187+ temp_filter.coeff_len = ARRAY_LEN (mid_qual_coeffs) ;
188188 break ;
189189
190190 case SRC_SINC_FASTEST :
191191 temp_filter.coeffs = fastest_coeffs ;
192− temp_filter.coeff_half_len = (sizeof (fastest_coeffs) / sizeof (coeff_t)) - 1 ;
192+ temp_filter.coeff_half_len = ARRAY_LEN (fastest_coeffs) - 1 ;
193193 temp_filter.index_inc = 128 ;
194194 temp_filter.has_diffs = SRC_FALSE ;
195− temp_filter.coeff_len = sizeof (fastest_coeffs) / sizeof (coeff_t) ;
195+ temp_filter.coeff_len = ARRAY_LEN (fastest_coeffs) ;
196196 break ;
197197
198198 default :

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t