diff options
Diffstat (limited to 'alc')
-rw-r--r-- | alc/alc.cpp | 13 | ||||
-rw-r--r-- | alc/alcmain.h | 2 | ||||
-rw-r--r-- | alc/alcontext.h | 4 | ||||
-rw-r--r-- | alc/alu.cpp | 2 | ||||
-rw-r--r-- | alc/backends/jack.cpp | 10 | ||||
-rw-r--r-- | alc/backends/pulseaudio.cpp | 4 | ||||
-rw-r--r-- | alc/effects/compressor.cpp | 2 | ||||
-rw-r--r-- | alc/panning.cpp | 2 |
8 files changed, 19 insertions, 20 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp index d1964bd4..fc4af2b0 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -1201,7 +1201,7 @@ void alc_initconfig(void) { if(len == strlen(effectitem.name) && strncmp(effectitem.name, str, len) == 0) - DisabledEffects[effectitem.type] = AL_TRUE; + DisabledEffects[effectitem.type] = true; } } while(next++); } @@ -1749,7 +1749,6 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) ALCuint new_sends{device->NumAuxSends}; DevFmtChannels oldChans; DevFmtType oldType; - ALboolean update_failed; ALCsizei hrtf_id{-1}; ALCuint oldFreq; @@ -2210,19 +2209,19 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) /* Need to delay returning failure until replacement Send arrays have been * allocated with the appropriate size. */ - update_failed = AL_FALSE; + bool update_failed{false}; FPUCtl mixer_mode{}; for(ALCcontext *context : *device->mContexts.load()) { if(context->mDefaultSlot) { - ALeffectslot *slot = context->mDefaultSlot.get(); + ALeffectslot *slot{context->mDefaultSlot.get()}; aluInitEffectPanning(slot, device); EffectState *state{slot->Effect.State}; state->mOutTarget = device->Dry.Buffer; - if(state->deviceUpdate(device) == AL_FALSE) - update_failed = AL_TRUE; + if(!state->deviceUpdate(device)) + update_failed = true; else UpdateEffectSlotProps(slot, context); } @@ -2246,7 +2245,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList) EffectState *state{slot->Effect.State}; state->mOutTarget = device->Dry.Buffer; if(state->deviceUpdate(device) == AL_FALSE) - update_failed = AL_TRUE; + update_failed = true; else UpdateEffectSlotProps(slot, context); } diff --git a/alc/alcmain.h b/alc/alcmain.h index 9293596d..b1f1d45e 100644 --- a/alc/alcmain.h +++ b/alc/alcmain.h @@ -225,7 +225,7 @@ struct ALCdevice : public al::intrusive_ref<ALCdevice> { DevFmtChannels FmtChans{}; DevFmtType FmtType{}; - ALboolean IsHeadphones{AL_FALSE}; + bool IsHeadphones{false}; ALuint mAmbiOrder{0}; /* For DevFmtAmbi* output only, specifies the channel order and * normalization. diff --git a/alc/alcontext.h b/alc/alcontext.h index aea2ea31..2ec3cf25 100644 --- a/alc/alcontext.h +++ b/alc/alcontext.h @@ -47,7 +47,7 @@ struct ALcontextProps { ALfloat DopplerFactor; ALfloat DopplerVelocity; ALfloat SpeedOfSound; - ALboolean SourceDistanceModel; + bool SourceDistanceModel; DistanceModel mDistanceModel; std::atomic<ALcontextProps*> next; @@ -111,7 +111,7 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext> { std::atomic<ALenum> mLastError{AL_NO_ERROR}; DistanceModel mDistanceModel{DistanceModel::Default}; - ALboolean mSourceDistanceModel{AL_FALSE}; + bool mSourceDistanceModel{false}; ALfloat mDopplerFactor{1.0f}; ALfloat mDopplerVelocity{1.0f}; diff --git a/alc/alu.cpp b/alc/alu.cpp index f50815ae..787cece0 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -436,7 +436,7 @@ bool CalcEffectSlotParams(ALeffectslot *slot, ALeffectslot **sorted_slots, ALCco slot->Params.DecayTime = 0.0f; slot->Params.DecayLFRatio = 0.0f; slot->Params.DecayHFRatio = 0.0f; - slot->Params.DecayHFLimit = AL_FALSE; + slot->Params.DecayHFLimit = false; slot->Params.AirAbsorptionGainHF = 1.0f; } diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp index 97837460..7e91f28c 100644 --- a/alc/backends/jack.cpp +++ b/alc/backends/jack.cpp @@ -101,9 +101,9 @@ decltype(jack_error_callback) * pjack_error_callback; jack_options_t ClientOptions = JackNullOption; -ALCboolean jack_load() +bool jack_load() { - ALCboolean error = ALC_FALSE; + bool error{false}; #ifdef HAVE_DYNLOAD if(!jack_handle) @@ -119,14 +119,14 @@ ALCboolean jack_load() if(!jack_handle) { WARN("Failed to load %s\n", JACKLIB); - return ALC_FALSE; + return false; } - error = ALC_FALSE; + error = false; #define LOAD_FUNC(f) do { \ p##f = reinterpret_cast<decltype(p##f)>(GetSymbol(jack_handle, #f)); \ if(p##f == nullptr) { \ - error = ALC_TRUE; \ + error = true; \ missing_funcs += "\n" #f; \ } \ } while(0) diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp index 4d546f44..e02193a1 100644 --- a/alc/backends/pulseaudio.cpp +++ b/alc/backends/pulseaudio.cpp @@ -825,8 +825,8 @@ void PulsePlayback::sinkInfoCallback(pa_context*, const pa_sink_info *info, int if(info->active_port) TRACE("Active port: %s (%s)\n", info->active_port->name, info->active_port->description); - mDevice->IsHeadphones = (mDevice->FmtChans == DevFmtStereo && - info->active_port && strcmp(info->active_port->name, "analog-output-headphones") == 0); + mDevice->IsHeadphones = (mDevice->FmtChans == DevFmtStereo + && info->active_port && strcmp(info->active_port->name, "analog-output-headphones") == 0); } void PulsePlayback::sinkNameCallback(pa_context*, const pa_sink_info *info, int eol) noexcept diff --git a/alc/effects/compressor.cpp b/alc/effects/compressor.cpp index ad82037a..e5e0339f 100644 --- a/alc/effects/compressor.cpp +++ b/alc/effects/compressor.cpp @@ -43,7 +43,7 @@ struct CompressorState final : public EffectState { ALfloat mGain[MAX_AMBI_CHANNELS][MAX_OUTPUT_CHANNELS]{}; /* Effect parameters */ - ALboolean mEnabled{AL_TRUE}; + bool mEnabled{true}; ALfloat mAttackMult{1.0f}; ALfloat mReleaseMult{1.0f}; ALfloat mEnvFollower{1.0f}; diff --git a/alc/panning.cpp b/alc/panning.cpp index 0b7b5038..13fdac6d 100644 --- a/alc/panning.cpp +++ b/alc/panning.cpp @@ -746,7 +746,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, HrtfRequestMode hrtf_appr return; } - bool headphones{device->IsHeadphones != AL_FALSE}; + bool headphones{device->IsHeadphones}; if(device->Type != Loopback) { if(auto modeopt = ConfigValueStr(device->DeviceName.c_str(), nullptr, "stereo-mode")) |