diff options
author | Chris Robinson <[email protected]> | 2020-03-28 15:03:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-03-28 18:15:05 -0700 |
commit | 504745abec35c4718833cd7c7ed8db3b242e0aa2 (patch) | |
tree | 4704dc2c020f6bdfacfa98143afe83933b053916 /alc | |
parent | e78cb9b77f380af164b972388c8a3d110080cdac (diff) |
Use a standard bool instead of ALboolean
Diffstat (limited to 'alc')
-rw-r--r-- | alc/effects/autowah.cpp | 6 | ||||
-rw-r--r-- | alc/effects/base.h | 2 | ||||
-rw-r--r-- | alc/effects/chorus.cpp | 6 | ||||
-rw-r--r-- | alc/effects/compressor.cpp | 6 | ||||
-rw-r--r-- | alc/effects/dedicated.cpp | 6 | ||||
-rw-r--r-- | alc/effects/distortion.cpp | 6 | ||||
-rw-r--r-- | alc/effects/echo.cpp | 6 | ||||
-rw-r--r-- | alc/effects/equalizer.cpp | 10 | ||||
-rw-r--r-- | alc/effects/fshifter.cpp | 6 | ||||
-rw-r--r-- | alc/effects/modulator.cpp | 6 | ||||
-rw-r--r-- | alc/effects/null.cpp | 6 | ||||
-rw-r--r-- | alc/effects/pshifter.cpp | 8 | ||||
-rw-r--r-- | alc/effects/reverb.cpp | 8 | ||||
-rw-r--r-- | alc/effects/vmorpher.cpp | 6 |
14 files changed, 44 insertions, 44 deletions
diff --git a/alc/effects/autowah.cpp b/alc/effects/autowah.cpp index a79c21d9..48a90f76 100644 --- a/alc/effects/autowah.cpp +++ b/alc/effects/autowah.cpp @@ -69,14 +69,14 @@ struct AutowahState final : public EffectState { alignas(16) ALfloat mBufferOut[BUFFERSIZE]; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(AutowahState) }; -ALboolean AutowahState::deviceUpdate(const ALCdevice*) +bool AutowahState::deviceUpdate(const ALCdevice*) { /* (Re-)initializing parameters and clear the buffers. */ @@ -101,7 +101,7 @@ ALboolean AutowahState::deviceUpdate(const ALCdevice*) chan.Filter.z2 = 0.0f; } - return AL_TRUE; + return true; } void AutowahState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/base.h b/alc/effects/base.h index e8134290..5d77e904 100644 --- a/alc/effects/base.h +++ b/alc/effects/base.h @@ -157,7 +157,7 @@ struct EffectState : public al::intrusive_ref<EffectState> { virtual ~EffectState() = default; - virtual ALboolean deviceUpdate(const ALCdevice *device) = 0; + virtual bool deviceUpdate(const ALCdevice *device) = 0; virtual void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) = 0; virtual void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) = 0; }; diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp index 59e05be0..a6408fce 100644 --- a/alc/effects/chorus.cpp +++ b/alc/effects/chorus.cpp @@ -108,14 +108,14 @@ struct ChorusState final : public EffectState { ALfloat mFeedback{0.0f}; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(ChorusState) }; -ALboolean ChorusState::deviceUpdate(const ALCdevice *Device) +bool ChorusState::deviceUpdate(const ALCdevice *Device) { constexpr ALfloat max_delay{maxf(AL_CHORUS_MAX_DELAY, AL_FLANGER_MAX_DELAY)}; @@ -134,7 +134,7 @@ ALboolean ChorusState::deviceUpdate(const ALCdevice *Device) std::fill(std::begin(e.Target), std::end(e.Target), 0.0f); } - return AL_TRUE; + return true; } void ChorusState::update(const ALCcontext *Context, const ALeffectslot *Slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/compressor.cpp b/alc/effects/compressor.cpp index 44ffaaef..ad82037a 100644 --- a/alc/effects/compressor.cpp +++ b/alc/effects/compressor.cpp @@ -49,14 +49,14 @@ struct CompressorState final : public EffectState { ALfloat mEnvFollower{1.0f}; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(CompressorState) }; -ALboolean CompressorState::deviceUpdate(const ALCdevice *device) +bool CompressorState::deviceUpdate(const ALCdevice *device) { /* Number of samples to do a full attack and release (non-integer sample * counts are okay). @@ -70,7 +70,7 @@ ALboolean CompressorState::deviceUpdate(const ALCdevice *device) mAttackMult = std::pow(AMP_ENVELOPE_MAX/AMP_ENVELOPE_MIN, 1.0f/attackCount); mReleaseMult = std::pow(AMP_ENVELOPE_MIN/AMP_ENVELOPE_MAX, 1.0f/releaseCount); - return AL_TRUE; + return true; } void CompressorState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp index aa81e13b..e1640498 100644 --- a/alc/effects/dedicated.cpp +++ b/alc/effects/dedicated.cpp @@ -37,17 +37,17 @@ struct DedicatedState final : public EffectState { ALfloat mTargetGains[MAX_OUTPUT_CHANNELS]; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(DedicatedState) }; -ALboolean DedicatedState::deviceUpdate(const ALCdevice*) +bool DedicatedState::deviceUpdate(const ALCdevice*) { std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f); - return AL_TRUE; + return true; } void DedicatedState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/distortion.cpp b/alc/effects/distortion.cpp index 48fc83ee..85b8c6fc 100644 --- a/alc/effects/distortion.cpp +++ b/alc/effects/distortion.cpp @@ -46,18 +46,18 @@ struct DistortionState final : public EffectState { ALfloat mBuffer[2][BUFFERSIZE]{}; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(DistortionState) }; -ALboolean DistortionState::deviceUpdate(const ALCdevice*) +bool DistortionState::deviceUpdate(const ALCdevice*) { mLowpass.clear(); mBandpass.clear(); - return AL_TRUE; + return true; } void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp index e68baddc..bc778d46 100644 --- a/alc/effects/echo.cpp +++ b/alc/effects/echo.cpp @@ -57,14 +57,14 @@ struct EchoState final : public EffectState { alignas(16) ALfloat mTempBuffer[2][BUFFERSIZE]; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(EchoState) }; -ALboolean EchoState::deviceUpdate(const ALCdevice *Device) +bool EchoState::deviceUpdate(const ALCdevice *Device) { const auto frequency = static_cast<float>(Device->Frequency); @@ -85,7 +85,7 @@ ALboolean EchoState::deviceUpdate(const ALCdevice *Device) std::fill(std::begin(e.Target), std::end(e.Target), 0.0f); } - return AL_TRUE; + return true; } void EchoState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/equalizer.cpp b/alc/effects/equalizer.cpp index a4204b3a..072a87e7 100644 --- a/alc/effects/equalizer.cpp +++ b/alc/effects/equalizer.cpp @@ -88,17 +88,17 @@ struct EqualizerState final : public EffectState { ALfloat TargetGains[MAX_OUTPUT_CHANNELS]{}; } mChans[MAX_AMBI_CHANNELS]; - ALfloat mSampleBuffer[BUFFERSIZE]{}; + FloatBufferLine mSampleBuffer{}; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(EqualizerState) }; -ALboolean EqualizerState::deviceUpdate(const ALCdevice*) +bool EqualizerState::deviceUpdate(const ALCdevice*) { for(auto &e : mChans) { @@ -106,7 +106,7 @@ ALboolean EqualizerState::deviceUpdate(const ALCdevice*) std::mem_fn(&BiquadFilter::clear)); std::fill(std::begin(e.CurrentGains), std::end(e.CurrentGains), 0.0f); } - return AL_TRUE; + return true; } void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) @@ -158,7 +158,7 @@ void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, void EqualizerState::process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) { - const al::span<float> buffer{mSampleBuffer, samplesToDo}; + const al::span<float> buffer{mSampleBuffer.data(), samplesToDo}; auto chandata = std::addressof(mChans[0]); for(const auto &input : samplesIn) { diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp index cb62adaa..fb859e23 100644 --- a/alc/effects/fshifter.cpp +++ b/alc/effects/fshifter.cpp @@ -82,14 +82,14 @@ struct FshifterState final : public EffectState { } mGains[2]; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(FshifterState) }; -ALboolean FshifterState::deviceUpdate(const ALCdevice*) +bool FshifterState::deviceUpdate(const ALCdevice*) { /* (Re-)initializing parameters and clear the buffers. */ mCount = FIFO_LATENCY; @@ -108,7 +108,7 @@ ALboolean FshifterState::deviceUpdate(const ALCdevice*) std::fill(std::begin(gain.Target), std::end(gain.Target), 0.0f); } - return AL_TRUE; + return true; } void FshifterState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/modulator.cpp b/alc/effects/modulator.cpp index 00afa052..5967cd40 100644 --- a/alc/effects/modulator.cpp +++ b/alc/effects/modulator.cpp @@ -82,21 +82,21 @@ struct ModulatorState final : public EffectState { } mChans[MAX_AMBI_CHANNELS]; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(ModulatorState) }; -ALboolean ModulatorState::deviceUpdate(const ALCdevice*) +bool ModulatorState::deviceUpdate(const ALCdevice*) { for(auto &e : mChans) { e.Filter.clear(); std::fill(std::begin(e.CurrentGains), std::end(e.CurrentGains), 0.0f); } - return AL_TRUE; + return true; } void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/null.cpp b/alc/effects/null.cpp index e0497296..306b9365 100644 --- a/alc/effects/null.cpp +++ b/alc/effects/null.cpp @@ -18,7 +18,7 @@ struct NullState final : public EffectState { NullState(); ~NullState() override; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -40,9 +40,9 @@ NullState::~NullState() = default; * format) have been changed. Will always be followed by a call to the update * method, if successful. */ -ALboolean NullState::deviceUpdate(const ALCdevice* /*device*/) +bool NullState::deviceUpdate(const ALCdevice* /*device*/) { - return AL_TRUE; + return true; } /* This updates the effect state with new properties. This is called any time diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp index 993c26e7..f433ec46 100644 --- a/alc/effects/pshifter.cpp +++ b/alc/effects/pshifter.cpp @@ -53,7 +53,7 @@ using complex_d = std::complex<double>; std::array<double,STFT_SIZE> InitHannWindow() { std::array<double,STFT_SIZE> ret; - /* Create lookup table of the Hann window for the desired size, i.e. HIL_SIZE */ + /* Create lookup table of the Hann window for the desired size, i.e. STFT_SIZE */ for(size_t i{0};i < STFT_SIZE>>1;i++) { constexpr double scale{al::MathDefs<double>::Pi() / double{STFT_SIZE-1}}; @@ -96,14 +96,14 @@ struct PshifterState final : public EffectState { float mTargetGains[MAX_OUTPUT_CHANNELS]; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; DEF_NEWDEL(PshifterState) }; -ALboolean PshifterState::deviceUpdate(const ALCdevice *device) +bool PshifterState::deviceUpdate(const ALCdevice *device) { /* (Re-)initializing parameters and clear the buffers. */ mCount = FIFO_LATENCY; @@ -122,7 +122,7 @@ ALboolean PshifterState::deviceUpdate(const ALCdevice *device) std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f); std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f); - return AL_TRUE; + return true; } void PshifterState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index 727c8352..5edea965 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -482,7 +482,7 @@ struct ReverbState final : public EffectState { void lateFaded(const size_t offset, const size_t todo, const ALfloat fade, const ALfloat fadeStep); - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -559,13 +559,13 @@ bool ReverbState::allocLines(const ALfloat frequency) return true; } -ALboolean ReverbState::deviceUpdate(const ALCdevice *device) +bool ReverbState::deviceUpdate(const ALCdevice *device) { const auto frequency = static_cast<ALfloat>(device->Frequency); /* Allocate the delay lines. */ if(!allocLines(frequency)) - return AL_FALSE; + return false; const ALfloat multiplier{CalcDelayLengthMult(AL_EAXREVERB_MAX_DENSITY)}; @@ -625,7 +625,7 @@ ALboolean ReverbState::deviceUpdate(const ALCdevice *device) std::fill(mAmbiSplitter[0].begin()+1, mAmbiSplitter[0].end(), mAmbiSplitter[0][0]); std::fill(mAmbiSplitter[1].begin(), mAmbiSplitter[1].end(), mAmbiSplitter[0][0]); - return AL_TRUE; + return true; } /************************************** diff --git a/alc/effects/vmorpher.cpp b/alc/effects/vmorpher.cpp index b1b7cc06..7628461f 100644 --- a/alc/effects/vmorpher.cpp +++ b/alc/effects/vmorpher.cpp @@ -135,7 +135,7 @@ struct VmorpherState final : public EffectState { ALfloat mSampleBufferA[MAX_UPDATE_SAMPLES]{}; ALfloat mSampleBufferB[MAX_UPDATE_SAMPLES]{}; - ALboolean deviceUpdate(const ALCdevice *device) override; + bool deviceUpdate(const ALCdevice *device) override; void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn, const al::span<FloatBufferLine> samplesOut) override; @@ -193,7 +193,7 @@ std::array<FormantFilter,4> VmorpherState::getFiltersByPhoneme(ALenum phoneme, A } -ALboolean VmorpherState::deviceUpdate(const ALCdevice* /*device*/) +bool VmorpherState::deviceUpdate(const ALCdevice* /*device*/) { for(auto &e : mChans) { @@ -204,7 +204,7 @@ ALboolean VmorpherState::deviceUpdate(const ALCdevice* /*device*/) std::fill(std::begin(e.CurrentGains), std::end(e.CurrentGains), 0.0f); } - return AL_TRUE; + return true; } void VmorpherState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) |