diff --git a/src/aac/aac.c b/src/aac/aac.c index 58a67c2..7a0eccf 100644 --- a/src/aac/aac.c +++ b/src/aac/aac.c @@ -56,9 +56,9 @@ int aac_header_decode(struct aac_header *hdr, const uint8_t *p, size_t len) channel_index = (p[1] >> 3) & 0xf; - if (srate_index >= ARRAY_SIZE(aac_sample_rates)) + if (srate_index >= RE_ARRAY_SIZE(aac_sample_rates)) return ENOTSUP; - if (channel_index >= ARRAY_SIZE(aac_channels)) + if (channel_index >= RE_ARRAY_SIZE(aac_channels)) return ENOTSUP; hdr->sample_rate = aac_sample_rates[srate_index]; diff --git a/src/auresamp/resamp.c b/src/auresamp/resamp.c index d4aefff..0a04a60 100644 --- a/src/auresamp/resamp.c +++ b/src/auresamp/resamp.c @@ -228,16 +228,16 @@ int auresamp_setup(struct auresamp *rs, uint32_t irate, unsigned ich, } else if (orate == 48000 && irate == 16000) { rs->tapv = fir_48_8; - rs->tapc = ARRAY_SIZE(fir_48_8); + rs->tapc = RE_ARRAY_SIZE(fir_48_8); } else if ((orate == 16000 && irate == 8000) || (orate == 32000 && irate == 16000)) { rs->tapv = fir_16_4; - rs->tapc = ARRAY_SIZE(fir_16_4); + rs->tapc = RE_ARRAY_SIZE(fir_16_4); } else { rs->tapv = fir_48_4; - rs->tapc = ARRAY_SIZE(fir_48_4); + rs->tapc = RE_ARRAY_SIZE(fir_48_4); } } else { @@ -263,16 +263,16 @@ int auresamp_setup(struct auresamp *rs, uint32_t irate, unsigned ich, if (irate == 48000 && orate == 16000) { rs->tapv = fir_48_8; - rs->tapc = ARRAY_SIZE(fir_48_8); + rs->tapc = RE_ARRAY_SIZE(fir_48_8); } else if ((irate == 16000 && orate == 8000) || (irate == 32000 && orate == 16000)) { rs->tapv = fir_16_4; - rs->tapc = ARRAY_SIZE(fir_16_4); + rs->tapc = RE_ARRAY_SIZE(fir_16_4); } else { rs->tapv = fir_48_4; - rs->tapc = ARRAY_SIZE(fir_48_4); + rs->tapc = RE_ARRAY_SIZE(fir_48_4); } } diff --git a/src/fir/fir.c b/src/fir/fir.c index 36c85c9..d8460d8 100644 --- a/src/fir/fir.c +++ b/src/fir/fir.c @@ -44,7 +44,7 @@ void fir_filter(struct fir *fir, int16_t *outv, const int16_t *inv, size_t inc, if (!fir || !outv || !inv || !ch || !tapv || !tapc) return; - if (hmask >= ARRAY_SIZE(fir->history) || hmask & (hmask+1)) + if (hmask >= RE_ARRAY_SIZE(fir->history) || hmask & (hmask+1)) return; while (inc--) {