aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp10
-rw-r--r--alc/alu.cpp4
-rw-r--r--alc/backends/alsa.cpp2
-rw-r--r--alc/backends/coreaudio.cpp4
-rw-r--r--alc/backends/dsound.cpp6
-rw-r--r--alc/backends/oboe.cpp4
-rw-r--r--alc/backends/oss.cpp2
-rw-r--r--alc/backends/pipewire.cpp5
-rw-r--r--alc/backends/portaudio.cpp4
-rw-r--r--alc/backends/sndio.cpp2
-rw-r--r--alc/backends/wasapi.cpp2
-rw-r--r--alc/backends/winmm.cpp5
-rw-r--r--alc/context.h2
-rw-r--r--alc/effects/base.h42
-rw-r--r--alc/effects/reverb.cpp5
15 files changed, 51 insertions, 48 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 9a919032..1ceae5ee 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -660,7 +660,7 @@ void alc_initconfig(void)
{
if(len == strlen(effectitem.name) &&
strncmp(effectitem.name, str, len) == 0)
- DisabledEffects[effectitem.type] = true;
+ DisabledEffects.set(effectitem.type);
}
} while(next++);
}
@@ -683,15 +683,15 @@ void alc_initconfig(void)
else
eax_g_is_enabled = true;
- if((DisabledEffects[EAXREVERB_EFFECT] || DisabledEffects[CHORUS_EFFECT])
+ if((DisabledEffects.test(EAXREVERB_EFFECT) || DisabledEffects.test(CHORUS_EFFECT))
&& eax_g_is_enabled)
{
eax_g_is_enabled = false;
TRACE("EAX disabled because %s disabled.\n",
- (DisabledEffects[EAXREVERB_EFFECT] && DisabledEffects[CHORUS_EFFECT])
+ (DisabledEffects.test(EAXREVERB_EFFECT) && DisabledEffects.test(CHORUS_EFFECT))
? "EAXReverb and Chorus are" :
- DisabledEffects[EAXREVERB_EFFECT] ? "EAXReverb is" :
- DisabledEffects[CHORUS_EFFECT] ? "Chorus is" : "");
+ DisabledEffects.test(EAXREVERB_EFFECT) ? "EAXReverb is" :
+ DisabledEffects.test(CHORUS_EFFECT) ? "Chorus is" : "");
}
}
#endif // ALSOFT_EAX
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 7b3cd957..fe47f9be 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -2257,10 +2257,10 @@ void DeviceBase::handleDisconnect(const char *msg, ...)
va_list args;
va_start(args, msg);
- int msglen{vsnprintf(disconnect.msg, sizeof(disconnect.msg), msg, args)};
+ int msglen{vsnprintf(disconnect.msg.data(), disconnect.msg.size(), msg, args)};
va_end(args);
- if(msglen < 0 || static_cast<size_t>(msglen) >= sizeof(disconnect.msg))
+ if(msglen < 0 || static_cast<size_t>(msglen) >= disconnect.msg.size())
disconnect.msg[sizeof(disconnect.msg)-1] = 0;
for(ContextBase *ctx : *mContexts.load())
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp
index 5aae834a..47c6385e 100644
--- a/alc/backends/alsa.cpp
+++ b/alc/backends/alsa.cpp
@@ -1039,7 +1039,7 @@ void AlsaCapture::captureSamples(std::byte *buffer, uint samples)
{
if(mRing)
{
- mRing->read(buffer, samples);
+ std::ignore = mRing->read(buffer, samples);
return;
}
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index 16b0781e..50e3bc66 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -657,7 +657,7 @@ OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags *ioActionFlags,
return err;
}
- mRing->write(mCaptureData.data(), inNumberFrames);
+ std::ignore = mRing->write(mCaptureData.data(), inNumberFrames);
return noErr;
}
@@ -924,7 +924,7 @@ void CoreAudioCapture::captureSamples(std::byte *buffer, uint samples)
{
if(!mConverter)
{
- mRing->read(buffer, samples);
+ std::ignore = mRing->read(buffer, samples);
return;
}
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp
index 58aa69b2..12196f74 100644
--- a/alc/backends/dsound.cpp
+++ b/alc/backends/dsound.cpp
@@ -717,7 +717,7 @@ void DSoundCapture::stop()
}
void DSoundCapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
uint DSoundCapture::availableSamples()
{
@@ -740,9 +740,9 @@ uint DSoundCapture::availableSamples()
}
if(SUCCEEDED(hr))
{
- mRing->write(ReadPtr1, ReadCnt1/FrameSize);
+ std::ignore = mRing->write(ReadPtr1, ReadCnt1/FrameSize);
if(ReadPtr2 != nullptr && ReadCnt2 > 0)
- mRing->write(ReadPtr2, ReadCnt2/FrameSize);
+ std::ignore = mRing->write(ReadPtr2, ReadCnt2/FrameSize);
hr = mDSCbuffer->Unlock(ReadPtr1, ReadCnt1, ReadPtr2, ReadCnt2);
mCursor = ReadCursor;
}
diff --git a/alc/backends/oboe.cpp b/alc/backends/oboe.cpp
index b7bab19a..9666063a 100644
--- a/alc/backends/oboe.cpp
+++ b/alc/backends/oboe.cpp
@@ -230,7 +230,7 @@ struct OboeCapture final : public BackendBase, public oboe::AudioStreamCallback
oboe::DataCallbackResult OboeCapture::onAudioReady(oboe::AudioStream*, void *audioData,
int32_t numFrames)
{
- mRing->write(audioData, static_cast<uint32_t>(numFrames));
+ std::ignore = mRing->write(audioData, static_cast<uint32_t>(numFrames));
return oboe::DataCallbackResult::Continue;
}
@@ -330,7 +330,7 @@ uint OboeCapture::availableSamples()
{ return static_cast<uint>(mRing->readSpace()); }
void OboeCapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
} // namespace
diff --git a/alc/backends/oss.cpp b/alc/backends/oss.cpp
index 87d3ba35..010b0749 100644
--- a/alc/backends/oss.cpp
+++ b/alc/backends/oss.cpp
@@ -617,7 +617,7 @@ void OSScapture::stop()
}
void OSScapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
uint OSScapture::availableSamples()
{ return static_cast<uint>(mRing->readSpace()); }
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index 01896b01..96b6623f 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -1933,7 +1933,8 @@ void PipeWireCapture::inputCallback() noexcept
const uint offset{minu(bufdata->chunk->offset, bufdata->maxsize)};
const uint size{minu(bufdata->chunk->size, bufdata->maxsize - offset)};
- mRing->write(static_cast<char*>(bufdata->data) + offset, size / mRing->getElemSize());
+ std::ignore = mRing->write(static_cast<char*>(bufdata->data) + offset,
+ size / mRing->getElemSize());
pw_stream_queue_buffer(mStream.get(), pw_buf);
}
@@ -2154,7 +2155,7 @@ uint PipeWireCapture::availableSamples()
{ return static_cast<uint>(mRing->readSpace()); }
void PipeWireCapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
} // namespace
diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp
index 979a54d6..2e2e33cc 100644
--- a/alc/backends/portaudio.cpp
+++ b/alc/backends/portaudio.cpp
@@ -271,7 +271,7 @@ PortCapture::~PortCapture()
int PortCapture::readCallback(const void *inputBuffer, void*, unsigned long framesPerBuffer,
const PaStreamCallbackTimeInfo*, const PaStreamCallbackFlags) noexcept
{
- mRing->write(inputBuffer, framesPerBuffer);
+ std::ignore = mRing->write(inputBuffer, framesPerBuffer);
return 0;
}
@@ -350,7 +350,7 @@ uint PortCapture::availableSamples()
{ return static_cast<uint>(mRing->readSpace()); }
void PortCapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
} // namespace
diff --git a/alc/backends/sndio.cpp b/alc/backends/sndio.cpp
index d54c337b..8bf63a59 100644
--- a/alc/backends/sndio.cpp
+++ b/alc/backends/sndio.cpp
@@ -497,7 +497,7 @@ void SndioCapture::stop()
}
void SndioCapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
uint SndioCapture::availableSamples()
{ return static_cast<uint>(mRing->readSpace()); }
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index 436ee402..139fa696 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -2651,7 +2651,7 @@ void WasapiCapture::stopProxy()
void WasapiCapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
uint WasapiCapture::availableSamples()
{ return static_cast<uint>(mRing->readSpace()); }
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp
index f0fb0a1c..15776d17 100644
--- a/alc/backends/winmm.cpp
+++ b/alc/backends/winmm.cpp
@@ -435,7 +435,8 @@ int WinMMCapture::captureProc()
WAVEHDR &waveHdr = mWaveBuffer[widx];
widx = (widx+1) % mWaveBuffer.size();
- mRing->write(waveHdr.lpData, waveHdr.dwBytesRecorded / mFormat.nBlockAlign);
+ std::ignore = mRing->write(waveHdr.lpData,
+ waveHdr.dwBytesRecorded / mFormat.nBlockAlign);
mReadable.fetch_sub(1, std::memory_order_acq_rel);
waveInAddBuffer(mInHdl, &waveHdr, sizeof(WAVEHDR));
} while(--todo);
@@ -573,7 +574,7 @@ void WinMMCapture::stop()
}
void WinMMCapture::captureSamples(std::byte *buffer, uint samples)
-{ mRing->read(buffer, samples); }
+{ std::ignore = mRing->read(buffer, samples); }
uint WinMMCapture::availableSamples()
{ return static_cast<uint>(mRing->readSpace()); }
diff --git a/alc/context.h b/alc/context.h
index b190c5ea..32db76c7 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -560,7 +560,7 @@ private:
using ContextRef = al::intrusive_ptr<ALCcontext>;
-ContextRef GetContextRef(void);
+ContextRef GetContextRef();
void UpdateContextProps(ALCcontext *context);
diff --git a/alc/effects/base.h b/alc/effects/base.h
index 95695857..025ac663 100644
--- a/alc/effects/base.h
+++ b/alc/effects/base.h
@@ -4,23 +4,29 @@
#include "core/effects/base.h"
-EffectStateFactory *NullStateFactory_getFactory(void);
-EffectStateFactory *ReverbStateFactory_getFactory(void);
-EffectStateFactory *StdReverbStateFactory_getFactory(void);
-EffectStateFactory *AutowahStateFactory_getFactory(void);
-EffectStateFactory *ChorusStateFactory_getFactory(void);
-EffectStateFactory *CompressorStateFactory_getFactory(void);
-EffectStateFactory *DistortionStateFactory_getFactory(void);
-EffectStateFactory *EchoStateFactory_getFactory(void);
-EffectStateFactory *EqualizerStateFactory_getFactory(void);
-EffectStateFactory *FlangerStateFactory_getFactory(void);
-EffectStateFactory *FshifterStateFactory_getFactory(void);
-EffectStateFactory *ModulatorStateFactory_getFactory(void);
-EffectStateFactory *PshifterStateFactory_getFactory(void);
-EffectStateFactory* VmorpherStateFactory_getFactory(void);
-
-EffectStateFactory *DedicatedStateFactory_getFactory(void);
-
-EffectStateFactory *ConvolutionStateFactory_getFactory(void);
+/* This is a user config option for modifying the overall output of the reverb
+ * effect.
+ */
+inline float ReverbBoost{1.0f};
+
+
+EffectStateFactory *NullStateFactory_getFactory();
+EffectStateFactory *ReverbStateFactory_getFactory();
+EffectStateFactory *StdReverbStateFactory_getFactory();
+EffectStateFactory *AutowahStateFactory_getFactory();
+EffectStateFactory *ChorusStateFactory_getFactory();
+EffectStateFactory *CompressorStateFactory_getFactory();
+EffectStateFactory *DistortionStateFactory_getFactory();
+EffectStateFactory *EchoStateFactory_getFactory();
+EffectStateFactory *EqualizerStateFactory_getFactory();
+EffectStateFactory *FlangerStateFactory_getFactory();
+EffectStateFactory *FshifterStateFactory_getFactory();
+EffectStateFactory *ModulatorStateFactory_getFactory();
+EffectStateFactory *PshifterStateFactory_getFactory();
+EffectStateFactory* VmorpherStateFactory_getFactory();
+
+EffectStateFactory *DedicatedStateFactory_getFactory();
+
+EffectStateFactory *ConvolutionStateFactory_getFactory();
#endif /* EFFECTS_BASE_H */
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 6a9d1997..5157cf72 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -48,11 +48,6 @@
#include "vecmat.h"
#include "vector.h"
-/* This is a user config option for modifying the overall output of the reverb
- * effect.
- */
-float ReverbBoost = 1.0f;
-
namespace {
using uint = unsigned int;