aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/alsa.cpp6
-rw-r--r--Alc/backends/base.cpp5
-rw-r--r--Alc/backends/jack.cpp6
-rw-r--r--Alc/backends/null.cpp2
-rw-r--r--Alc/backends/oss.cpp10
-rw-r--r--Alc/backends/portaudio.cpp8
-rw-r--r--Alc/backends/pulseaudio.cpp8
-rw-r--r--Alc/backends/wave.cpp6
-rw-r--r--Alc/effects/autowah.cpp6
-rw-r--r--Alc/effects/chorus.cpp6
-rw-r--r--Alc/effects/compressor.cpp4
-rw-r--r--Alc/effects/dedicated.cpp4
-rw-r--r--Alc/effects/distortion.cpp6
-rw-r--r--Alc/effects/echo.cpp6
-rw-r--r--Alc/effects/equalizer.cpp6
-rw-r--r--Alc/effects/fshifter.cpp4
-rw-r--r--Alc/effects/modulator.cpp6
-rw-r--r--Alc/effects/null.cpp12
-rw-r--r--Alc/effects/pshifter.cpp4
-rw-r--r--Alc/effects/reverb.cpp8
-rw-r--r--Alc/filters/nfc.cpp2
-rw-r--r--Alc/helpers.cpp14
-rw-r--r--Alc/mixer/mixer_c.cpp2
-rw-r--r--Alc/mixvoice.cpp20
-rw-r--r--Alc/panning.cpp10
-rw-r--r--Alc/ringbuffer.cpp6
26 files changed, 86 insertions, 91 deletions
diff --git a/Alc/backends/alsa.cpp b/Alc/backends/alsa.cpp
index 5fe8ef96..ef5d6f7c 100644
--- a/Alc/backends/alsa.cpp
+++ b/Alc/backends/alsa.cpp
@@ -22,8 +22,8 @@
#include "backends/alsa.h"
-#include <stdlib.h>
-#include <stdio.h>
+#include <cstdlib>
+#include <cstdio>
#include <memory.h>
#include <atomic>
@@ -204,7 +204,7 @@ ALSA_FUNCS(MAKE_FUNC);
#endif
-bool alsa_load(void)
+bool alsa_load()
{
bool error{false};
diff --git a/Alc/backends/base.cpp b/Alc/backends/base.cpp
index e3753426..ba5e5486 100644
--- a/Alc/backends/base.cpp
+++ b/Alc/backends/base.cpp
@@ -1,7 +1,7 @@
#include "config.h"
-#include <stdlib.h>
+#include <cstdlib>
#include <thread>
@@ -24,8 +24,7 @@ ClockLatency GetClockLatency(ALCdevice *device)
BackendBase::BackendBase(ALCdevice *device) noexcept : mDevice{device}
{ }
-BackendBase::~BackendBase()
-{ }
+BackendBase::~BackendBase() = default;
ALCboolean BackendBase::reset()
{ return ALC_FALSE; }
diff --git a/Alc/backends/jack.cpp b/Alc/backends/jack.cpp
index 78de2699..c079bb19 100644
--- a/Alc/backends/jack.cpp
+++ b/Alc/backends/jack.cpp
@@ -22,8 +22,8 @@
#include "backends/jack.h"
-#include <stdlib.h>
-#include <stdio.h>
+#include <cstdlib>
+#include <cstdio>
#include <memory.h>
#include <thread>
@@ -100,7 +100,7 @@ decltype(jack_error_callback) * pjack_error_callback;
jack_options_t ClientOptions = JackNullOption;
-ALCboolean jack_load(void)
+ALCboolean jack_load()
{
ALCboolean error = ALC_FALSE;
diff --git a/Alc/backends/null.cpp b/Alc/backends/null.cpp
index cba204f6..38ac0154 100644
--- a/Alc/backends/null.cpp
+++ b/Alc/backends/null.cpp
@@ -22,7 +22,7 @@
#include "backends/null.h"
-#include <stdlib.h>
+#include <cstdlib>
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
diff --git a/Alc/backends/oss.cpp b/Alc/backends/oss.cpp
index 05394f34..3634cce9 100644
--- a/Alc/backends/oss.cpp
+++ b/Alc/backends/oss.cpp
@@ -27,14 +27,14 @@
#include <sys/time.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
#include <memory.h>
#include <unistd.h>
-#include <errno.h>
+#include <cerrno>
#include <poll.h>
-#include <math.h>
+#include <cmath>
#include <atomic>
#include <thread>
diff --git a/Alc/backends/portaudio.cpp b/Alc/backends/portaudio.cpp
index 074508b2..f6cf7c05 100644
--- a/Alc/backends/portaudio.cpp
+++ b/Alc/backends/portaudio.cpp
@@ -22,9 +22,9 @@
#include "backends/portaudio.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include "alMain.h"
#include "alu.h"
@@ -69,7 +69,7 @@ MAKE_FUNC(Pa_GetStreamInfo);
#endif
#endif
-bool pa_load(void)
+bool pa_load()
{
PaError err;
diff --git a/Alc/backends/pulseaudio.cpp b/Alc/backends/pulseaudio.cpp
index b717d67a..bf952813 100644
--- a/Alc/backends/pulseaudio.cpp
+++ b/Alc/backends/pulseaudio.cpp
@@ -23,7 +23,7 @@
#include "backends/pulseaudio.h"
-#include <string.h>
+#include <cstring>
#include <array>
#include <string>
@@ -186,7 +186,7 @@ MAKE_FUNC(pa_stream_begin_write);
#endif
-ALCboolean pulse_load(void)
+ALCboolean pulse_load()
{
ALCboolean ret{ALC_TRUE};
#ifdef HAVE_DYNLOAD
@@ -599,7 +599,7 @@ void device_sink_callback(pa_context *UNUSED(context), const pa_sink_info *info,
TRACE("Got device \"%s\", \"%s\"\n", newentry.name.c_str(), newentry.device_name.c_str());
}
-void probePlaybackDevices(void)
+void probePlaybackDevices()
{
PlaybackDevices.clear();
@@ -681,7 +681,7 @@ void device_source_callback(pa_context *UNUSED(context), const pa_source_info *i
TRACE("Got device \"%s\", \"%s\"\n", newentry.name.c_str(), newentry.device_name.c_str());
}
-void probeCaptureDevices(void)
+void probeCaptureDevices()
{
CaptureDevices.clear();
diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp
index 42b67a19..aa1aab1f 100644
--- a/Alc/backends/wave.cpp
+++ b/Alc/backends/wave.cpp
@@ -22,10 +22,10 @@
#include "backends/wave.h"
-#include <stdlib.h>
-#include <stdio.h>
+#include <cstdlib>
+#include <cstdio>
#include <memory.h>
-#include <errno.h>
+#include <cerrno>
#include <chrono>
#include <thread>
diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp
index 7df5d49e..f7d07fe2 100644
--- a/Alc/effects/autowah.cpp
+++ b/Alc/effects/autowah.cpp
@@ -20,8 +20,8 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
#include <algorithm>
@@ -203,7 +203,7 @@ struct AutowahStateFactory final : public EffectStateFactory {
EffectState *AutowahStateFactory::create()
{ return new ALautowahState{}; }
-EffectStateFactory *AutowahStateFactory_getFactory(void)
+EffectStateFactory *AutowahStateFactory_getFactory()
{
static AutowahStateFactory AutowahFactory{};
return &AutowahFactory;
diff --git a/Alc/effects/chorus.cpp b/Alc/effects/chorus.cpp
index 990b3cc4..05216059 100644
--- a/Alc/effects/chorus.cpp
+++ b/Alc/effects/chorus.cpp
@@ -20,7 +20,7 @@
#include "config.h"
-#include <stdlib.h>
+#include <cstdlib>
#include <cmath>
#include <algorithm>
@@ -265,7 +265,7 @@ EffectState *ChorusStateFactory::create()
} // namespace
-EffectStateFactory *ChorusStateFactory_getFactory(void)
+EffectStateFactory *ChorusStateFactory_getFactory()
{
static ChorusStateFactory ChorusFactory{};
return &ChorusFactory;
@@ -384,7 +384,7 @@ DEFINE_ALEFFECT_VTABLE(ALchorus);
/* Flanger is basically a chorus with a really short delay. They can both use
* the same processing functions, so piggyback flanger on the chorus functions.
*/
-EffectStateFactory *FlangerStateFactory_getFactory(void)
+EffectStateFactory *FlangerStateFactory_getFactory()
{ return ChorusStateFactory_getFactory(); }
diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp
index 1b840c44..93ab9bbc 100644
--- a/Alc/effects/compressor.cpp
+++ b/Alc/effects/compressor.cpp
@@ -20,7 +20,7 @@
#include "config.h"
-#include <stdlib.h>
+#include <cstdlib>
#include "alMain.h"
#include "alcontext.h"
@@ -160,7 +160,7 @@ struct CompressorStateFactory final : public EffectStateFactory {
EffectState *CompressorStateFactory::create()
{ return new ALcompressorState{}; }
-EffectStateFactory *CompressorStateFactory_getFactory(void)
+EffectStateFactory *CompressorStateFactory_getFactory()
{
static CompressorStateFactory CompressorFactory{};
return &CompressorFactory;
diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp
index f9faa63d..64b24e9d 100644
--- a/Alc/effects/dedicated.cpp
+++ b/Alc/effects/dedicated.cpp
@@ -20,7 +20,7 @@
#include "config.h"
-#include <stdlib.h>
+#include <cstdlib>
#include <cmath>
#include <algorithm>
@@ -102,7 +102,7 @@ struct DedicatedStateFactory final : public EffectStateFactory {
EffectState *DedicatedStateFactory::create()
{ return new ALdedicatedState{}; }
-EffectStateFactory *DedicatedStateFactory_getFactory(void)
+EffectStateFactory *DedicatedStateFactory_getFactory()
{
static DedicatedStateFactory DedicatedFactory{};
return &DedicatedFactory;
diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp
index 1b9c66fa..12eb12fb 100644
--- a/Alc/effects/distortion.cpp
+++ b/Alc/effects/distortion.cpp
@@ -20,8 +20,8 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
#include <cmath>
@@ -169,7 +169,7 @@ struct DistortionStateFactory final : public EffectStateFactory {
EffectState *DistortionStateFactory::create()
{ return new ALdistortionState{}; }
-EffectStateFactory *DistortionStateFactory_getFactory(void)
+EffectStateFactory *DistortionStateFactory_getFactory()
{
static DistortionStateFactory DistortionFactory{};
return &DistortionFactory;
diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp
index 697d2e88..197e9686 100644
--- a/Alc/effects/echo.cpp
+++ b/Alc/effects/echo.cpp
@@ -20,8 +20,8 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
#include <algorithm>
@@ -180,7 +180,7 @@ struct EchoStateFactory final : public EffectStateFactory {
EffectState *EchoStateFactory::create()
{ return new ALechoState{}; }
-EffectStateFactory *EchoStateFactory_getFactory(void)
+EffectStateFactory *EchoStateFactory_getFactory()
{
static EchoStateFactory EchoFactory{};
return &EchoFactory;
diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp
index defe1485..fc00d00f 100644
--- a/Alc/effects/equalizer.cpp
+++ b/Alc/effects/equalizer.cpp
@@ -20,8 +20,8 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
#include <algorithm>
#include <functional>
@@ -184,7 +184,7 @@ struct EqualizerStateFactory final : public EffectStateFactory {
EffectState *EqualizerStateFactory::create()
{ return new ALequalizerState{}; }
-EffectStateFactory *EqualizerStateFactory_getFactory(void)
+EffectStateFactory *EqualizerStateFactory_getFactory()
{
static EqualizerStateFactory EqualizerFactory{};
return &EqualizerFactory;
diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp
index 994dd90c..55ff4247 100644
--- a/Alc/effects/fshifter.cpp
+++ b/Alc/effects/fshifter.cpp
@@ -46,7 +46,7 @@ using complex_d = std::complex<double>;
/* Define a Hann window, used to filter the HIL input and output. */
/* Making this constexpr seems to require C++14. */
-std::array<ALdouble,HIL_SIZE> InitHannWindow(void)
+std::array<ALdouble,HIL_SIZE> InitHannWindow()
{
std::array<ALdouble,HIL_SIZE> ret;
/* Create lookup table of the Hann window for the desired size, i.e. HIL_SIZE */
@@ -211,7 +211,7 @@ struct FshifterStateFactory final : public EffectStateFactory {
EffectState *FshifterStateFactory::create()
{ return new ALfshifterState{}; }
-EffectStateFactory *FshifterStateFactory_getFactory(void)
+EffectStateFactory *FshifterStateFactory_getFactory()
{
static FshifterStateFactory FshifterFactory{};
return &FshifterFactory;
diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp
index 9549740e..d9a3046e 100644
--- a/Alc/effects/modulator.cpp
+++ b/Alc/effects/modulator.cpp
@@ -20,8 +20,8 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
#include <cmath>
#include <algorithm>
@@ -177,7 +177,7 @@ struct ModulatorStateFactory final : public EffectStateFactory {
EffectState *ModulatorStateFactory::create()
{ return new ALmodulatorState{}; }
-EffectStateFactory *ModulatorStateFactory_getFactory(void)
+EffectStateFactory *ModulatorStateFactory_getFactory()
{
static ModulatorStateFactory ModulatorFactory{};
return &ModulatorFactory;
diff --git a/Alc/effects/null.cpp b/Alc/effects/null.cpp
index fa35b3c4..96cb3114 100644
--- a/Alc/effects/null.cpp
+++ b/Alc/effects/null.cpp
@@ -1,6 +1,6 @@
#include "config.h"
-#include <stdlib.h>
+#include <cstdlib>
#include "AL/al.h"
#include "AL/alc.h"
@@ -25,16 +25,12 @@ struct ALnullState final : public EffectState {
/* This constructs the effect state. It's called when the object is first
* created.
*/
-ALnullState::ALnullState()
-{
-}
+ALnullState::ALnullState() = default;
/* This destructs the effect state. It's called only when the effect slot is no
* longer used prior to being freed.
*/
-ALnullState::~ALnullState()
-{
-}
+ALnullState::~ALnullState() = default;
/* This updates the device-dependant effect state. This is called on
* initialization and any time the device parameters (eg. playback frequency,
@@ -69,7 +65,7 @@ struct NullStateFactory final : public EffectStateFactory {
EffectState *NullStateFactory::create()
{ return new ALnullState{}; }
-EffectStateFactory *NullStateFactory_getFactory(void)
+EffectStateFactory *NullStateFactory_getFactory()
{
static NullStateFactory NullFactory{};
return &NullFactory;
diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp
index f0b9de1c..7bd7ada0 100644
--- a/Alc/effects/pshifter.cpp
+++ b/Alc/effects/pshifter.cpp
@@ -78,7 +78,7 @@ inline int double2int(double d)
/* Define a Hann window, used to filter the STFT input and output. */
/* Making this constexpr seems to require C++14. */
-std::array<ALdouble,STFT_SIZE> InitHannWindow(void)
+std::array<ALdouble,STFT_SIZE> InitHannWindow()
{
std::array<ALdouble,STFT_SIZE> ret;
/* Create lookup table of the Hann window for the desired size, i.e. HIL_SIZE */
@@ -326,7 +326,7 @@ struct PshifterStateFactory final : public EffectStateFactory {
EffectState *PshifterStateFactory::create()
{ return new ALpshifterState{}; }
-EffectStateFactory *PshifterStateFactory_getFactory(void)
+EffectStateFactory *PshifterStateFactory_getFactory()
{
static PshifterStateFactory PshifterFactory{};
return &PshifterFactory;
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp
index a63cc4c3..6f007046 100644
--- a/Alc/effects/reverb.cpp
+++ b/Alc/effects/reverb.cpp
@@ -20,9 +20,9 @@
#include "config.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
+#include <cstdio>
+#include <cstdlib>
+#include <cmath>
#include <cmath>
#include <algorithm>
@@ -1420,7 +1420,7 @@ EffectState *ReverbStateFactory::create()
} // namespace
-EffectStateFactory *ReverbStateFactory_getFactory(void)
+EffectStateFactory *ReverbStateFactory_getFactory()
{
static ReverbStateFactory ReverbFactory{};
return &ReverbFactory;
diff --git a/Alc/filters/nfc.cpp b/Alc/filters/nfc.cpp
index fd98eef0..47af60bd 100644
--- a/Alc/filters/nfc.cpp
+++ b/Alc/filters/nfc.cpp
@@ -7,7 +7,7 @@
#include "alMain.h"
-#include <string.h>
+#include <cstring>
/* Near-field control filters are the basis for handling the near-field effect.
diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp
index 88c222bf..13ba3a2a 100644
--- a/Alc/helpers.cpp
+++ b/Alc/helpers.cpp
@@ -28,11 +28,11 @@
#include "config.h"
-#include <stdlib.h>
-#include <time.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <ctype.h>
+#include <cstdlib>
+#include <ctime>
+#include <cerrno>
+#include <cstdarg>
+#include <cctype>
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
@@ -93,7 +93,7 @@ DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x
#include <sys/sysconf.h>
#endif
#ifdef HAVE_FLOAT_H
-#include <float.h>
+#include <cfloat>
#endif
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
@@ -713,7 +713,7 @@ al::vector<std::string> SearchDataFiles(const char *ext, const char *subdir)
return results;
}
-void SetRTPriority(void)
+void SetRTPriority()
{
bool failed = false;
#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && !defined(__OpenBSD__)
diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp
index 1b16b733..38bb7b64 100644
--- a/Alc/mixer/mixer_c.cpp
+++ b/Alc/mixer/mixer_c.cpp
@@ -1,6 +1,6 @@
#include "config.h"
-#include <assert.h>
+#include <cassert>
#include <limits>
diff --git a/Alc/mixvoice.cpp b/Alc/mixvoice.cpp
index e52b330d..7d30ad12 100644
--- a/Alc/mixvoice.cpp
+++ b/Alc/mixvoice.cpp
@@ -20,11 +20,11 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
+#include <cassert>
#include <numeric>
#include <algorithm>
@@ -61,7 +61,7 @@ RowMixerFunc MixRowSamples = MixRow_C;
static HrtfMixerFunc MixHrtfSamples = MixHrtf_C;
static HrtfMixerBlendFunc MixHrtfBlendSamples = MixHrtfBlend_C;
-static MixerFunc SelectMixer(void)
+static MixerFunc SelectMixer()
{
#ifdef HAVE_NEON
if((CPUCapFlags&CPU_CAP_NEON))
@@ -74,7 +74,7 @@ static MixerFunc SelectMixer(void)
return Mix_C;
}
-static RowMixerFunc SelectRowMixer(void)
+static RowMixerFunc SelectRowMixer()
{
#ifdef HAVE_NEON
if((CPUCapFlags&CPU_CAP_NEON))
@@ -87,7 +87,7 @@ static RowMixerFunc SelectRowMixer(void)
return MixRow_C;
}
-static inline HrtfMixerFunc SelectHrtfMixer(void)
+static inline HrtfMixerFunc SelectHrtfMixer()
{
#ifdef HAVE_NEON
if((CPUCapFlags&CPU_CAP_NEON))
@@ -100,7 +100,7 @@ static inline HrtfMixerFunc SelectHrtfMixer(void)
return MixHrtf_C;
}
-static inline HrtfMixerBlendFunc SelectHrtfBlendMixer(void)
+static inline HrtfMixerBlendFunc SelectHrtfBlendMixer()
{
#ifdef HAVE_NEON
if((CPUCapFlags&CPU_CAP_NEON))
@@ -152,7 +152,7 @@ ResamplerFunc SelectResampler(Resampler resampler)
}
-void aluInitMixer(void)
+void aluInitMixer()
{
const char *str;
diff --git a/Alc/panning.cpp b/Alc/panning.cpp
index 99a0534f..9c92a166 100644
--- a/Alc/panning.cpp
+++ b/Alc/panning.cpp
@@ -20,11 +20,11 @@
#include "config.h"
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
+#include <cmath>
+#include <cstdlib>
+#include <cstring>
+#include <cctype>
+#include <cassert>
#include <cmath>
#include <numeric>
diff --git a/Alc/ringbuffer.cpp b/Alc/ringbuffer.cpp
index 21884f6c..7f0aa630 100644
--- a/Alc/ringbuffer.cpp
+++ b/Alc/ringbuffer.cpp
@@ -20,9 +20,9 @@
#include "config.h"
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
+#include <cstring>
+#include <cstdlib>
+#include <climits>
#include <algorithm>