From fd1361c1982e28fe4be287cb41ae24c3fc926ae8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 27 Oct 2018 18:58:58 -0700 Subject: Add a RESTRICT macro to help with C++ compatibility --- Alc/filters/defs.h | 4 ++-- Alc/filters/nfc.h | 6 +++--- Alc/hrtf.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'Alc') diff --git a/Alc/filters/defs.h b/Alc/filters/defs.h index 133a85eb..beb4ab3e 100644 --- a/Alc/filters/defs.h +++ b/Alc/filters/defs.h @@ -84,7 +84,7 @@ inline void BiquadFilter_clear(BiquadFilter *filter) */ void BiquadFilter_setParams(BiquadFilter *filter, BiquadType type, ALfloat gain, ALfloat f0norm, ALfloat rcpQ); -inline void BiquadFilter_copyParams(BiquadFilter *restrict dst, const BiquadFilter *restrict src) +inline void BiquadFilter_copyParams(BiquadFilter *RESTRICT dst, const BiquadFilter *RESTRICT src) { dst->b0 = src->b0; dst->b1 = src->b1; @@ -93,7 +93,7 @@ inline void BiquadFilter_copyParams(BiquadFilter *restrict dst, const BiquadFilt dst->a2 = src->a2; } -void BiquadFilter_processC(BiquadFilter *filter, ALfloat *restrict dst, const ALfloat *restrict src, ALsizei numsamples); +void BiquadFilter_processC(BiquadFilter *filter, ALfloat *RESTRICT dst, const ALfloat *RESTRICT src, ALsizei numsamples); inline void BiquadFilter_passthru(BiquadFilter *filter, ALsizei numsamples) { diff --git a/Alc/filters/nfc.h b/Alc/filters/nfc.h index 12a5a18f..e02c00d8 100644 --- a/Alc/filters/nfc.h +++ b/Alc/filters/nfc.h @@ -38,12 +38,12 @@ void NfcFilterCreate(NfcFilter *nfc, const float w0, const float w1); void NfcFilterAdjust(NfcFilter *nfc, const float w0); /* Near-field control filter for first-order ambisonic channels (1-3). */ -void NfcFilterProcess1(NfcFilter *nfc, float *restrict dst, const float *restrict src, const int count); +void NfcFilterProcess1(NfcFilter *nfc, float *RESTRICT dst, const float *RESTRICT src, const int count); /* Near-field control filter for second-order ambisonic channels (4-8). */ -void NfcFilterProcess2(NfcFilter *nfc, float *restrict dst, const float *restrict src, const int count); +void NfcFilterProcess2(NfcFilter *nfc, float *RESTRICT dst, const float *RESTRICT src, const int count); /* Near-field control filter for third-order ambisonic channels (9-15). */ -void NfcFilterProcess3(NfcFilter *nfc, float *restrict dst, const float *restrict src, const int count); +void NfcFilterProcess3(NfcFilter *nfc, float *RESTRICT dst, const float *RESTRICT src, const int count); #endif /* FILTER_NFC_H */ diff --git a/Alc/hrtf.h b/Alc/hrtf.h index ab68929b..dab6a28e 100644 --- a/Alc/hrtf.h +++ b/Alc/hrtf.h @@ -71,7 +71,7 @@ struct Hrtf *GetLoadedHrtf(struct HrtfEntry *entry); void Hrtf_IncRef(struct Hrtf *hrtf); void Hrtf_DecRef(struct Hrtf *hrtf); -void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat spread, ALfloat (*coeffs)[2], ALsizei *delays); +void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, ALfloat spread, ALfloat (*RESTRICT coeffs)[2], ALsizei *delays); /** * Produces HRTF filter coefficients for decoding B-Format, given a set of @@ -79,6 +79,6 @@ void GetHrtfCoeffs(const struct Hrtf *Hrtf, ALfloat elevation, ALfloat azimuth, * frequency gains for the decoder. The calculated impulse responses are * ordered and scaled according to the matrix input. */ -void BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsizei NumChannels, const struct AngularPoint *AmbiPoints, const ALfloat (*restrict AmbiMatrix)[MAX_AMBI_COEFFS], ALsizei AmbiCount, const ALfloat *restrict AmbiOrderHFGain); +void BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsizei NumChannels, const struct AngularPoint *AmbiPoints, const ALfloat (*RESTRICT AmbiMatrix)[MAX_AMBI_COEFFS], ALsizei AmbiCount, const ALfloat *RESTRICT AmbiOrderHFGain); #endif /* ALC_HRTF_H */ -- cgit v1.2.3