Remove the UNUSED macro

This commit is contained in:
Chris Robinson 2019-07-28 17:15:34 -07:00
parent c8bbd75bf9
commit b4d56d3fdf
29 changed files with 96 additions and 126 deletions

View File

@ -29,7 +29,7 @@ BackendBase::~BackendBase() = default;
ALCboolean BackendBase::reset() ALCboolean BackendBase::reset()
{ return ALC_FALSE; } { return ALC_FALSE; }
ALCenum BackendBase::captureSamples(void* UNUSED(buffer), ALCuint UNUSED(samples)) ALCenum BackendBase::captureSamples(void*, ALCuint)
{ return ALC_INVALID_DEVICE; } { return ALC_INVALID_DEVICE; }
ALCuint BackendBase::availableSamples() ALCuint BackendBase::availableSamples()

View File

@ -81,9 +81,8 @@ OSStatus CoreAudioPlayback::MixerProcC(void *inRefCon,
inBusNumber, inNumberFrames, ioData); inBusNumber, inNumberFrames, ioData);
} }
OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags* UNUSED(ioActionFlags), OSStatus CoreAudioPlayback::MixerProc(AudioUnitRenderActionFlags*,
const AudioTimeStamp* UNUSED(inTimeStamp), UInt32 UNUSED(inBusNumber), const AudioTimeStamp*, UInt32, UInt32, AudioBufferList *ioData)
UInt32 UNUSED(inNumberFrames), AudioBufferList *ioData)
{ {
lock(); lock();
aluMixData(mDevice, ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize/mFrameSize); aluMixData(mDevice, ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize/mFrameSize);
@ -347,9 +346,9 @@ OSStatus CoreAudioCapture::RecordProcC(void *inRefCon,
inBusNumber, inNumberFrames, ioData); inBusNumber, inNumberFrames, ioData);
} }
OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags* UNUSED(ioActionFlags), OSStatus CoreAudioCapture::RecordProc(AudioUnitRenderActionFlags*,
const AudioTimeStamp *inTimeStamp, UInt32 UNUSED(inBusNumber), UInt32 inNumberFrames, const AudioTimeStamp *inTimeStamp, UInt32, UInt32 inNumberFrames,
AudioBufferList* UNUSED(ioData)) AudioBufferList*)
{ {
AudioUnitRenderActionFlags flags = 0; AudioUnitRenderActionFlags flags = 0;
union { union {

View File

@ -127,7 +127,7 @@ bool checkName(const al::vector<DevMap> &list, const std::string &name)
) != list.cend(); ) != list.cend();
} }
BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR* UNUSED(drvname), void *data) BOOL CALLBACK DSoundEnumDevices(GUID *guid, const WCHAR *desc, const WCHAR*, void *data)
{ {
if(!guid) if(!guid)
return TRUE; return TRUE;

View File

@ -64,13 +64,13 @@ void LoopbackBackend::stop()
bool LoopbackBackendFactory::init() bool LoopbackBackendFactory::init()
{ return true; } { return true; }
bool LoopbackBackendFactory::querySupport(BackendType UNUSED(type)) bool LoopbackBackendFactory::querySupport(BackendType)
{ return true; } { return true; }
void LoopbackBackendFactory::probe(DevProbe, std::string*) void LoopbackBackendFactory::probe(DevProbe, std::string*)
{ } { }
BackendPtr LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType UNUSED(type)) BackendPtr LoopbackBackendFactory::createBackend(ALCdevice *device, BackendType)
{ return BackendPtr{new LoopbackBackend{device}}; } { return BackendPtr{new LoopbackBackend{device}}; }
BackendFactory &LoopbackBackendFactory::getFactory() BackendFactory &LoopbackBackendFactory::getFactory()

View File

@ -198,7 +198,7 @@ OpenSLPlayback::~OpenSLPlayback()
void OpenSLPlayback::processC(SLAndroidSimpleBufferQueueItf bq, void *context) void OpenSLPlayback::processC(SLAndroidSimpleBufferQueueItf bq, void *context)
{ static_cast<OpenSLPlayback*>(context)->process(bq); } { static_cast<OpenSLPlayback*>(context)->process(bq); }
void OpenSLPlayback::process(SLAndroidSimpleBufferQueueItf UNUSED(bq)) void OpenSLPlayback::process(SLAndroidSimpleBufferQueueItf)
{ {
/* A note on the ringbuffer usage: The buffer queue seems to hold on to the /* A note on the ringbuffer usage: The buffer queue seems to hold on to the
* pointer passed to the Enqueue method, rather than copying the audio. * pointer passed to the Enqueue method, rather than copying the audio.
@ -650,7 +650,7 @@ OpenSLCapture::~OpenSLCapture()
void OpenSLCapture::processC(SLAndroidSimpleBufferQueueItf bq, void *context) void OpenSLCapture::processC(SLAndroidSimpleBufferQueueItf bq, void *context)
{ static_cast<OpenSLCapture*>(context)->process(bq); } { static_cast<OpenSLCapture*>(context)->process(bq); }
void OpenSLCapture::process(SLAndroidSimpleBufferQueueItf UNUSED(bq)) void OpenSLCapture::process(SLAndroidSimpleBufferQueueItf)
{ {
/* A new chunk has been written into the ring buffer, advance it. */ /* A new chunk has been written into the ring buffer, advance it. */
mRing->writeAdvance(1); mRing->writeAdvance(1);

View File

@ -109,9 +109,9 @@ int PortPlayback::writeCallbackC(const void *inputBuffer, void *outputBuffer,
framesPerBuffer, timeInfo, statusFlags); framesPerBuffer, timeInfo, statusFlags);
} }
int PortPlayback::writeCallback(const void* UNUSED(inputBuffer), void *outputBuffer, int PortPlayback::writeCallback(const void*, void *outputBuffer,
unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo* UNUSED(timeInfo), unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo*,
const PaStreamCallbackFlags UNUSED(statusFlags)) const PaStreamCallbackFlags)
{ {
lock(); lock();
aluMixData(mDevice, outputBuffer, framesPerBuffer); aluMixData(mDevice, outputBuffer, framesPerBuffer);
@ -275,9 +275,9 @@ int PortCapture::readCallbackC(const void *inputBuffer, void *outputBuffer,
framesPerBuffer, timeInfo, statusFlags); framesPerBuffer, timeInfo, statusFlags);
} }
int PortCapture::readCallback(const void *inputBuffer, void *UNUSED(outputBuffer), int PortCapture::readCallback(const void *inputBuffer, void*,
unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *UNUSED(timeInfo), unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo*,
const PaStreamCallbackFlags UNUSED(statusFlags)) const PaStreamCallbackFlags)
{ {
mRing->write(inputBuffer, framesPerBuffer); mRing->write(inputBuffer, framesPerBuffer);
return 0; return 0;

View File

@ -496,7 +496,7 @@ pa_stream *pulse_connect_stream(const char *device_name, std::unique_lock<std::m
} }
void device_sink_callback(pa_context *UNUSED(context), const pa_sink_info *info, int eol, void* /*pdata*/) void device_sink_callback(pa_context*, const pa_sink_info *info, int eol, void*)
{ {
if(eol) if(eol)
{ {
@ -567,7 +567,7 @@ void probePlaybackDevices()
} }
void device_source_callback(pa_context *UNUSED(context), const pa_source_info *info, int eol, void* /*pdata*/) void device_source_callback(pa_context*, const pa_source_info *info, int eol, void*)
{ {
if(eol) if(eol)
{ {
@ -751,7 +751,7 @@ void PulsePlayback::streamWriteCallback(pa_stream *stream, size_t nbytes)
void PulsePlayback::sinkInfoCallbackC(pa_context *context, const pa_sink_info *info, int eol, void *pdata) void PulsePlayback::sinkInfoCallbackC(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
{ static_cast<PulsePlayback*>(pdata)->sinkInfoCallback(context, info, eol); } { static_cast<PulsePlayback*>(pdata)->sinkInfoCallback(context, info, eol); }
void PulsePlayback::sinkInfoCallback(pa_context* UNUSED(context), const pa_sink_info *info, int eol) void PulsePlayback::sinkInfoCallback(pa_context*, const pa_sink_info *info, int eol)
{ {
struct ChannelMap { struct ChannelMap {
DevFmtChannels chans; DevFmtChannels chans;
@ -798,7 +798,7 @@ void PulsePlayback::sinkInfoCallback(pa_context* UNUSED(context), const pa_sink_
void PulsePlayback::sinkNameCallbackC(pa_context *context, const pa_sink_info *info, int eol, void *pdata) void PulsePlayback::sinkNameCallbackC(pa_context *context, const pa_sink_info *info, int eol, void *pdata)
{ static_cast<PulsePlayback*>(pdata)->sinkNameCallback(context, info, eol); } { static_cast<PulsePlayback*>(pdata)->sinkNameCallback(context, info, eol); }
void PulsePlayback::sinkNameCallback(pa_context* UNUSED(context), const pa_sink_info *info, int eol) void PulsePlayback::sinkNameCallback(pa_context*, const pa_sink_info *info, int eol)
{ {
if(eol) if(eol)
{ {
@ -1171,7 +1171,7 @@ void PulseCapture::streamStateCallback(pa_stream *stream)
void PulseCapture::sourceNameCallbackC(pa_context *context, const pa_source_info *info, int eol, void *pdata) void PulseCapture::sourceNameCallbackC(pa_context *context, const pa_source_info *info, int eol, void *pdata)
{ static_cast<PulseCapture*>(pdata)->sourceNameCallback(context, info, eol); } { static_cast<PulseCapture*>(pdata)->sourceNameCallback(context, info, eol); }
void PulseCapture::sourceNameCallback(pa_context* UNUSED(context), const pa_source_info *info, int eol) void PulseCapture::sourceNameCallback(pa_context*, const pa_source_info *info, int eol)
{ {
if(eol) if(eol)
{ {

View File

@ -169,8 +169,7 @@ void CALLBACK WinMMPlayback::waveOutProcC(HWAVEOUT device, UINT msg, DWORD_PTR i
* Posts a message to 'WinMMPlayback::mixerProc' everytime a WaveOut Buffer is * Posts a message to 'WinMMPlayback::mixerProc' everytime a WaveOut Buffer is
* completed and returns to the application (for more data) * completed and returns to the application (for more data)
*/ */
void CALLBACK WinMMPlayback::waveOutProc(HWAVEOUT UNUSED(device), UINT msg, void CALLBACK WinMMPlayback::waveOutProc(HWAVEOUT, UINT msg, DWORD_PTR, DWORD_PTR)
DWORD_PTR UNUSED(param1), DWORD_PTR UNUSED(param2))
{ {
if(msg != WOM_DONE) return; if(msg != WOM_DONE) return;
mWritable.fetch_add(1, std::memory_order_acq_rel); mWritable.fetch_add(1, std::memory_order_acq_rel);
@ -414,8 +413,7 @@ void CALLBACK WinMMCapture::waveInProcC(HWAVEIN device, UINT msg, DWORD_PTR inst
* Posts a message to 'WinMMCapture::captureProc' everytime a WaveIn Buffer is * Posts a message to 'WinMMCapture::captureProc' everytime a WaveIn Buffer is
* completed and returns to the application (with more data). * completed and returns to the application (with more data).
*/ */
void CALLBACK WinMMCapture::waveInProc(HWAVEIN UNUSED(device), UINT msg, void CALLBACK WinMMCapture::waveInProc(HWAVEIN, UINT msg, DWORD_PTR, DWORD_PTR)
DWORD_PTR UNUSED(param1), DWORD_PTR UNUSED(param2))
{ {
if(msg != WIM_DATA) return; if(msg != WIM_DATA) return;
mReadable.fetch_add(1, std::memory_order_acq_rel); mReadable.fetch_add(1, std::memory_order_acq_rel);

View File

@ -77,7 +77,7 @@ struct ALautowahState final : public EffectState {
DEF_NEWDEL(ALautowahState) DEF_NEWDEL(ALautowahState)
}; };
ALboolean ALautowahState::deviceUpdate(const ALCdevice *UNUSED(device)) ALboolean ALautowahState::deviceUpdate(const ALCdevice*)
{ {
/* (Re-)initializing parameters and clear the buffers. */ /* (Re-)initializing parameters and clear the buffers. */

View File

@ -74,7 +74,7 @@ ALboolean CompressorState::deviceUpdate(const ALCdevice *device)
return AL_TRUE; return AL_TRUE;
} }
void CompressorState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) void CompressorState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target)
{ {
mEnabled = props->Compressor.OnOff; mEnabled = props->Compressor.OnOff;

View File

@ -45,13 +45,13 @@ struct DedicatedState final : public EffectState {
DEF_NEWDEL(DedicatedState) DEF_NEWDEL(DedicatedState)
}; };
ALboolean DedicatedState::deviceUpdate(const ALCdevice *UNUSED(device)) ALboolean DedicatedState::deviceUpdate(const ALCdevice*)
{ {
std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f); std::fill(std::begin(mCurrentGains), std::end(mCurrentGains), 0.0f);
return AL_TRUE; return AL_TRUE;
} }
void DedicatedState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) void DedicatedState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target)
{ {
std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f); std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f);

View File

@ -55,7 +55,7 @@ struct DistortionState final : public EffectState {
DEF_NEWDEL(DistortionState) DEF_NEWDEL(DistortionState)
}; };
ALboolean DistortionState::deviceUpdate(const ALCdevice *UNUSED(device)) ALboolean DistortionState::deviceUpdate(const ALCdevice*)
{ {
mLowpass.clear(); mLowpass.clear();
mBandpass.clear(); mBandpass.clear();

View File

@ -99,7 +99,7 @@ struct EqualizerState final : public EffectState {
DEF_NEWDEL(EqualizerState) DEF_NEWDEL(EqualizerState)
}; };
ALboolean EqualizerState::deviceUpdate(const ALCdevice *UNUSED(device)) ALboolean EqualizerState::deviceUpdate(const ALCdevice*)
{ {
for(auto &e : mChans) for(auto &e : mChans)
{ {

View File

@ -88,7 +88,7 @@ struct FshifterState final : public EffectState {
DEF_NEWDEL(FshifterState) DEF_NEWDEL(FshifterState)
}; };
ALboolean FshifterState::deviceUpdate(const ALCdevice *UNUSED(device)) ALboolean FshifterState::deviceUpdate(const ALCdevice*)
{ {
/* (Re-)initializing parameters and clear the buffers. */ /* (Re-)initializing parameters and clear the buffers. */
mCount = FIFO_LATENCY; mCount = FIFO_LATENCY;

View File

@ -59,7 +59,7 @@ inline ALfloat Square(ALsizei index)
return static_cast<ALfloat>(((index>>(WAVEFORM_FRACBITS-2))&2) - 1); return static_cast<ALfloat>(((index>>(WAVEFORM_FRACBITS-2))&2) - 1);
} }
inline ALfloat One(ALsizei UNUSED(index)) inline ALfloat One(ALsizei)
{ {
return 1.0f; return 1.0f;
} }
@ -98,7 +98,7 @@ struct ModulatorState final : public EffectState {
DEF_NEWDEL(ModulatorState) DEF_NEWDEL(ModulatorState)
}; };
ALboolean ModulatorState::deviceUpdate(const ALCdevice *UNUSED(device)) ALboolean ModulatorState::deviceUpdate(const ALCdevice*)
{ {
for(auto &e : mChans) for(auto &e : mChans)
{ {

View File

@ -34,20 +34,21 @@ NullState::NullState() = default;
*/ */
NullState::~NullState() = default; NullState::~NullState() = default;
/* This updates the device-dependant effect state. This is called on /* This updates the device-dependant effect state. This is called on state
* initialization and any time the device parameters (e.g. playback frequency, * initialization and any time the device parameters (e.g. playback frequency,
* format) have been changed. Will always be followed by a call to the update * format) have been changed. Will always be followed by a call to the update
* method, if successful. * method, if successful.
*/ */
ALboolean NullState::deviceUpdate(const ALCdevice* UNUSED(device)) ALboolean NullState::deviceUpdate(const ALCdevice* /*device*/)
{ {
return AL_TRUE; return AL_TRUE;
} }
/* This updates the effect state. This is called any time the effect is /* This updates the effect state with new properties. This is called any time
* (re)loaded into a slot. * the effect is (re)loaded into a slot.
*/ */
void NullState::update(const ALCcontext* UNUSED(context), const ALeffectslot* UNUSED(slot), const EffectProps* UNUSED(props), const EffectTarget UNUSED(target)) void NullState::update(const ALCcontext* /*context*/, const ALeffectslot* /*slot*/,
const EffectProps* /*props*/, const EffectTarget /*target*/)
{ {
} }
@ -55,12 +56,14 @@ void NullState::update(const ALCcontext* UNUSED(context), const ALeffectslot* UN
* input to the output buffer. The result should be added to the output buffer, * input to the output buffer. The result should be added to the output buffer,
* not replace it. * not replace it.
*/ */
void NullState::process(const ALsizei /*samplesToDo*/, const FloatBufferLine *RESTRICT /*samplesIn*/, const ALsizei /*numInput*/, const al::span<FloatBufferLine> /*samplesOut*/) void NullState::process(const ALsizei /*samplesToDo*/,
const FloatBufferLine *RESTRICT /*samplesIn*/, const ALsizei /*numInput*/,
const al::span<FloatBufferLine> /*samplesOut*/)
{ {
} }
void NullEffect_setParami(EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint UNUSED(val)) void NullEffect_setParami(EffectProps* /*props*/, ALCcontext *context, ALenum param, ALint /*val*/)
{ {
switch(param) switch(param)
{ {
@ -76,7 +79,7 @@ void NullEffect_setParamiv(EffectProps *props, ALCcontext *context, ALenum param
NullEffect_setParami(props, context, param, vals[0]); NullEffect_setParami(props, context, param, vals[0]);
} }
} }
void NullEffect_setParamf(EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat UNUSED(val)) void NullEffect_setParamf(EffectProps* /*props*/, ALCcontext *context, ALenum param, ALfloat /*val*/)
{ {
switch(param) switch(param)
{ {
@ -93,7 +96,7 @@ void NullEffect_setParamfv(EffectProps *props, ALCcontext *context, ALenum param
} }
} }
void NullEffect_getParami(const EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint* UNUSED(val)) void NullEffect_getParami(const EffectProps* /*props*/, ALCcontext *context, ALenum param, ALint* /*val*/)
{ {
switch(param) switch(param)
{ {
@ -109,7 +112,7 @@ void NullEffect_getParamiv(const EffectProps *props, ALCcontext *context, ALenum
NullEffect_getParami(props, context, param, vals); NullEffect_getParami(props, context, param, vals);
} }
} }
void NullEffect_getParamf(const EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat* UNUSED(val)) void NullEffect_getParamf(const EffectProps* /*props*/, ALCcontext *context, ALenum param, ALfloat* /*val*/)
{ {
switch(param) switch(param)
{ {

View File

@ -181,7 +181,7 @@ ALboolean PshifterState::deviceUpdate(const ALCdevice *device)
return AL_TRUE; return AL_TRUE;
} }
void PshifterState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) void PshifterState::update(const ALCcontext*, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target)
{ {
const float pitch{std::pow(2.0f, const float pitch{std::pow(2.0f,
static_cast<ALfloat>(props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune) / 1200.0f static_cast<ALfloat>(props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune) / 1200.0f

View File

@ -47,22 +47,21 @@ namespace {
inline ALfloat Sin(ALsizei index) inline ALfloat Sin(ALsizei index)
{ {
return (std::sin(static_cast<ALfloat>(index) * constexpr ALfloat scale{al::MathDefs<float>::Tau() / ALfloat{WAVEFORM_FRACONE}};
(al::MathDefs<float>::Tau() / ALfloat{WAVEFORM_FRACONE})))*0.5f+0.5f; return std::sin(static_cast<ALfloat>(index) * scale)*0.5f + 0.5f;
} }
inline ALfloat Saw(ALsizei index) inline ALfloat Saw(ALsizei index)
{ {
return (static_cast<ALfloat>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f)*0.5f+0.5f; return static_cast<ALfloat>(index) / ALfloat{WAVEFORM_FRACONE};
} }
inline ALfloat Triangle(ALsizei index) inline ALfloat Triangle(ALsizei index)
{ {
return (std::fabs(static_cast<ALfloat>(index) * (al::MathDefs<float>::Tau() / WAVEFORM_FRACONE) - return std::fabs(static_cast<ALfloat>(index)*(2.0f/WAVEFORM_FRACONE) - 1.0f);
al::MathDefs<float>::Pi()) / al::MathDefs<float>::Pi())*0.5f+0.5f;
} }
inline ALfloat Half(ALsizei UNUSED(index)) inline ALfloat Half(ALsizei)
{ {
return 0.5f; return 0.5f;
} }

View File

@ -1195,7 +1195,7 @@ void AddBuiltInEntry(al::vector<EnumeratedHrtf> &list, const std::string &filena
using ResData = al::span<const char>; using ResData = al::span<const char>;
#ifndef ALSOFT_EMBED_HRTF_DATA #ifndef ALSOFT_EMBED_HRTF_DATA
ResData GetResource(int UNUSED(name)) ResData GetResource(int /*name*/)
{ return ResData{}; } { return ResData{}; }
#else #else

View File

@ -70,9 +70,8 @@ const ALfloat *DoResample(const InterpState *state, const ALfloat *RESTRICT src,
} // namespace } // namespace
template<> template<>
const ALfloat *Resample_<CopyTag,CTag>(const InterpState* UNUSED(state), const ALfloat *Resample_<CopyTag,CTag>(const InterpState*, const ALfloat *RESTRICT src, ALsizei,
const ALfloat *RESTRICT src, ALsizei UNUSED(frac), ALint UNUSED(increment), ALint, ALfloat *RESTRICT dst, ALsizei dstlen)
ALfloat *RESTRICT dst, ALsizei dstlen)
{ {
ASSUME(dstlen > 0); ASSUME(dstlen > 0);
#if defined(HAVE_SSE) || defined(HAVE_NEON) #if defined(HAVE_SSE) || defined(HAVE_NEON)

View File

@ -15,9 +15,8 @@
template<> template<>
const ALfloat *Resample_<LerpTag,NEONTag>(const InterpState* UNUSED(state), const ALfloat *Resample_<LerpTag,NEONTag>(const InterpState*, const ALfloat *RESTRICT src,
const ALfloat *RESTRICT src, ALsizei frac, ALint increment, ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei dstlen)
ALfloat *RESTRICT dst, ALsizei dstlen)
{ {
const int32x4_t increment4 = vdupq_n_s32(increment*4); const int32x4_t increment4 = vdupq_n_s32(increment*4);
const float32x4_t fracOne4 = vdupq_n_f32(1.0f/FRACTIONONE); const float32x4_t fracOne4 = vdupq_n_f32(1.0f/FRACTIONONE);

View File

@ -28,9 +28,8 @@
template<> template<>
const ALfloat *Resample_<LerpTag,SSE2Tag>(const InterpState* UNUSED(state), const ALfloat *Resample_<LerpTag,SSE2Tag>(const InterpState*, const ALfloat *RESTRICT src,
const ALfloat *RESTRICT src, ALsizei frac, ALint increment, ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei dstlen)
ALfloat *RESTRICT dst, ALsizei dstlen)
{ {
const __m128i increment4{_mm_set1_epi32(increment*4)}; const __m128i increment4{_mm_set1_epi32(increment*4)};
const __m128 fracOne4{_mm_set1_ps(1.0f/FRACTIONONE)}; const __m128 fracOne4{_mm_set1_ps(1.0f/FRACTIONONE)};

View File

@ -29,9 +29,8 @@
template<> template<>
const ALfloat *Resample_<LerpTag,SSE4Tag>(const InterpState* UNUSED(state), const ALfloat *Resample_<LerpTag,SSE4Tag>(const InterpState*, const ALfloat *RESTRICT src,
const ALfloat *RESTRICT src, ALsizei frac, ALint increment, ALsizei frac, ALint increment, ALfloat *RESTRICT dst, ALsizei dstlen)
ALfloat *RESTRICT dst, ALsizei dstlen)
{ {
const __m128i increment4{_mm_set1_epi32(increment*4)}; const __m128i increment4{_mm_set1_epi32(increment*4)};
const __m128 fracOne4{_mm_set1_ps(1.0f/FRACTIONONE)}; const __m128 fracOne4{_mm_set1_ps(1.0f/FRACTIONONE)};

View File

@ -38,19 +38,6 @@ struct Uhj2Encoder;
struct bs2b; struct bs2b;
#ifndef UNUSED
#if defined(__cplusplus)
#define UNUSED(x)
#elif defined(__GNUC__)
#define UNUSED(x) UNUSED_##x __attribute__((unused))
#elif defined(__LCLINT__)
#define UNUSED(x) /*@unused@*/ x
#else
#define UNUSED(x) x
#endif
#endif
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__)
#define IS_LITTLE_ENDIAN (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) #define IS_LITTLE_ENDIAN (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#else #else

View File

@ -759,9 +759,9 @@ START_API_FUNC
END_API_FUNC END_API_FUNC
AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint UNUSED(buffer), AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint /*buffer*/, ALuint /*samplerate*/,
ALuint UNUSED(samplerate), ALenum UNUSED(internalformat), ALsizei UNUSED(samples), ALenum /*internalformat*/, ALsizei /*samples*/, ALenum /*channels*/, ALenum /*type*/,
ALenum UNUSED(channels), ALenum UNUSED(type), const ALvoid *UNUSED(data)) const ALvoid* /*data*/)
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};
@ -771,9 +771,8 @@ START_API_FUNC
} }
END_API_FUNC END_API_FUNC
AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint UNUSED(buffer), AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint /*buffer*/, ALsizei /*offset*/,
ALsizei UNUSED(offset), ALsizei UNUSED(samples), ALsizei /*samples*/, ALenum /*channels*/, ALenum /*type*/, const ALvoid* /*data*/)
ALenum UNUSED(channels), ALenum UNUSED(type), const ALvoid *UNUSED(data))
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};
@ -783,9 +782,8 @@ START_API_FUNC
} }
END_API_FUNC END_API_FUNC
AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint UNUSED(buffer), AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint /*buffer*/, ALsizei /*offset*/,
ALsizei UNUSED(offset), ALsizei UNUSED(samples), ALsizei /*samples*/, ALenum /*channels*/, ALenum /*type*/, ALvoid* /*data*/)
ALenum UNUSED(channels), ALenum UNUSED(type), ALvoid *UNUSED(data))
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};
@ -795,7 +793,7 @@ START_API_FUNC
} }
END_API_FUNC END_API_FUNC
AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum UNUSED(format)) AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum /*format*/)
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};
@ -807,7 +805,7 @@ START_API_FUNC
END_API_FUNC END_API_FUNC
AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat UNUSED(value)) AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat /*value*/)
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};
@ -826,7 +824,8 @@ START_API_FUNC
} }
END_API_FUNC END_API_FUNC
AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat UNUSED(value1), ALfloat UNUSED(value2), ALfloat UNUSED(value3)) AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param,
ALfloat /*value1*/, ALfloat /*value2*/, ALfloat /*value3*/)
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};
@ -901,7 +900,8 @@ START_API_FUNC
} }
END_API_FUNC END_API_FUNC
AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint UNUSED(value1), ALint UNUSED(value2), ALint UNUSED(value3)) AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param,
ALint /*value1*/, ALint /*value2*/, ALint /*value3*/)
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};

View File

@ -37,9 +37,9 @@ namespace {
#define FILTER_MIN_GAIN 0.0f #define FILTER_MIN_GAIN 0.0f
#define FILTER_MAX_GAIN 4.0f /* +12dB */ #define FILTER_MAX_GAIN 4.0f /* +12dB */
void ALlowpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) void ALlowpass_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint)
{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); }
void ALlowpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) void ALlowpass_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); }
void ALlowpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val) void ALlowpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{ {
@ -64,9 +64,9 @@ void ALlowpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, AL
void ALlowpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals) void ALlowpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{ ALlowpass_setParamf(filter, context, param, vals[0]); } { ALlowpass_setParamf(filter, context, param, vals[0]); }
void ALlowpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) void ALlowpass_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer property 0x%04x", param); }
void ALlowpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) void ALlowpass_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid low-pass integer-vector property 0x%04x", param); }
void ALlowpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val) void ALlowpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{ {
@ -90,9 +90,9 @@ void ALlowpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param, A
DEFINE_ALFILTER_VTABLE(ALlowpass); DEFINE_ALFILTER_VTABLE(ALlowpass);
void ALhighpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) void ALhighpass_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint)
{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); }
void ALhighpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) void ALhighpass_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); }
void ALhighpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val) void ALhighpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{ {
@ -117,9 +117,9 @@ void ALhighpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, A
void ALhighpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals) void ALhighpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{ ALhighpass_setParamf(filter, context, param, vals[0]); } { ALhighpass_setParamf(filter, context, param, vals[0]); }
void ALhighpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) void ALhighpass_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer property 0x%04x", param); }
void ALhighpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) void ALhighpass_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid high-pass integer-vector property 0x%04x", param); }
void ALhighpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val) void ALhighpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{ {
@ -143,9 +143,9 @@ void ALhighpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param,
DEFINE_ALFILTER_VTABLE(ALhighpass); DEFINE_ALFILTER_VTABLE(ALhighpass);
void ALbandpass_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) void ALbandpass_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint)
{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); }
void ALbandpass_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) void ALbandpass_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); }
void ALbandpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val) void ALbandpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{ {
@ -176,9 +176,9 @@ void ALbandpass_setParamf(ALfilter *filter, ALCcontext *context, ALenum param, A
void ALbandpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals) void ALbandpass_setParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{ ALbandpass_setParamf(filter, context, param, vals[0]); } { ALbandpass_setParamf(filter, context, param, vals[0]); }
void ALbandpass_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) void ALbandpass_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer property 0x%04x", param); }
void ALbandpass_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) void ALbandpass_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid band-pass integer-vector property 0x%04x", param); }
void ALbandpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val) void ALbandpass_getParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{ {
@ -206,22 +206,22 @@ void ALbandpass_getParamfv(ALfilter *filter, ALCcontext *context, ALenum param,
DEFINE_ALFILTER_VTABLE(ALbandpass); DEFINE_ALFILTER_VTABLE(ALbandpass);
void ALnullfilter_setParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint UNUSED(val)) void ALnullfilter_setParami(ALfilter*, ALCcontext *context, ALenum param, ALint)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
void ALnullfilter_setParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALint *UNUSED(vals)) void ALnullfilter_setParamiv(ALfilter*, ALCcontext *context, ALenum param, const ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
void ALnullfilter_setParamf(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat UNUSED(val)) void ALnullfilter_setParamf(ALfilter*, ALCcontext *context, ALenum param, ALfloat)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
void ALnullfilter_setParamfv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, const ALfloat *UNUSED(vals)) void ALnullfilter_setParamfv(ALfilter*, ALCcontext *context, ALenum param, const ALfloat*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
void ALnullfilter_getParami(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(val)) void ALnullfilter_getParami(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
void ALnullfilter_getParamiv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALint *UNUSED(vals)) void ALnullfilter_getParamiv(ALfilter*, ALCcontext *context, ALenum param, ALint*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
void ALnullfilter_getParamf(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat *UNUSED(val)) void ALnullfilter_getParamf(ALfilter*, ALCcontext *context, ALenum param, ALfloat*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
void ALnullfilter_getParamfv(ALfilter *UNUSED(filter), ALCcontext *context, ALenum param, ALfloat *UNUSED(vals)) void ALnullfilter_getParamfv(ALfilter*, ALCcontext *context, ALenum param, ALfloat*)
{ alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); } { alSetError(context, AL_INVALID_ENUM, "Invalid null filter property 0x%04x", param); }
DEFINE_ALFILTER_VTABLE(ALnullfilter); DEFINE_ALFILTER_VTABLE(ALnullfilter);

View File

@ -154,7 +154,7 @@ START_API_FUNC
END_API_FUNC END_API_FUNC
AL_API ALvoid AL_APIENTRY alListeneri(ALenum param, ALint UNUSED(value)) AL_API ALvoid AL_APIENTRY alListeneri(ALenum param, ALint /*value*/)
START_API_FUNC START_API_FUNC
{ {
ContextRef context{GetContextRef()}; ContextRef context{GetContextRef()};

View File

@ -25,7 +25,7 @@ FILE *LogFile;
static void LoadDriverList(void); static void LoadDriverList(void);
BOOL APIENTRY DllMain(HINSTANCE UNUSED(module), DWORD reason, void* UNUSED(reserved)) BOOL APIENTRY DllMain(HINSTANCE, DWORD reason, void*)
{ {
const char *str; const char *str;

View File

@ -17,18 +17,6 @@
#include "AL/alext.h" #include "AL/alext.h"
#ifndef UNUSED
#if defined(__cplusplus)
#define UNUSED(x)
#elif defined(__GNUC__)
#define UNUSED(x) UNUSED_##x __attribute__((unused))
#elif defined(__LCLINT__)
#define UNUSED(x) /*@unused@*/ x
#else
#define UNUSED(x) x
#endif
#endif
#define MAKE_ALC_VER(major, minor) (((major)<<8) | (minor)) #define MAKE_ALC_VER(major, minor) (((major)<<8) | (minor))
struct DriverIface { struct DriverIface {