aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-16 17:48:33 -0800
committerChris Robinson <[email protected]>2023-12-16 17:48:33 -0800
commitbc83c874ff15b29fdab9b6c0bf40b268345b3026 (patch)
tree41691ecf41423d015726c334987df70bdf9b5396
parent4fb33be2b4cb548b4116ee4124ba3d8d2bcecb82 (diff)
Remove DEF_NEWDEL
C++17 provides alignment-aware allocators for us, so we don't need to use our own to make sure classes/structs are properly aligned.
-rw-r--r--al/auxeffectslot.h3
-rw-r--r--alc/backends/alsa.cpp4
-rw-r--r--alc/backends/coreaudio.cpp4
-rw-r--r--alc/backends/dsound.cpp4
-rw-r--r--alc/backends/jack.cpp2
-rw-r--r--alc/backends/loopback.cpp2
-rw-r--r--alc/backends/null.cpp2
-rw-r--r--alc/backends/opensl.cpp4
-rw-r--r--alc/backends/oss.cpp4
-rw-r--r--alc/backends/pipewire.cpp4
-rw-r--r--alc/backends/portaudio.cpp4
-rw-r--r--alc/backends/pulseaudio.cpp4
-rw-r--r--alc/backends/sdl2.cpp2
-rw-r--r--alc/backends/sndio.cpp4
-rw-r--r--alc/backends/solaris.cpp2
-rw-r--r--alc/backends/wasapi.cpp4
-rw-r--r--alc/backends/wave.cpp2
-rw-r--r--alc/backends/winmm.cpp4
-rw-r--r--alc/context.h2
-rw-r--r--alc/device.h2
-rw-r--r--alc/effects/autowah.cpp2
-rw-r--r--alc/effects/chorus.cpp2
-rw-r--r--alc/effects/compressor.cpp2
-rw-r--r--alc/effects/convolution.cpp2
-rw-r--r--alc/effects/dedicated.cpp2
-rw-r--r--alc/effects/distortion.cpp2
-rw-r--r--alc/effects/echo.cpp2
-rw-r--r--alc/effects/equalizer.cpp2
-rw-r--r--alc/effects/fshifter.cpp2
-rw-r--r--alc/effects/modulator.cpp2
-rw-r--r--alc/effects/null.cpp2
-rw-r--r--alc/effects/pshifter.cpp2
-rw-r--r--alc/effects/reverb.cpp2
-rw-r--r--alc/effects/vmorpher.cpp2
-rw-r--r--common/almalloc.h13
-rw-r--r--core/bformatdec.h2
-rw-r--r--core/context.h6
-rw-r--r--core/device.h2
-rw-r--r--core/effectslot.h4
-rw-r--r--core/uhjfilter.h10
-rw-r--r--core/voice.h4
-rw-r--r--core/voice_change.h4
-rw-r--r--utils/uhjdecoder.cpp3
-rw-r--r--utils/uhjencoder.cpp3
44 files changed, 2 insertions, 140 deletions
diff --git a/al/auxeffectslot.h b/al/auxeffectslot.h
index bfd4038e..fc474bb4 100644
--- a/al/auxeffectslot.h
+++ b/al/auxeffectslot.h
@@ -81,9 +81,6 @@ struct ALeffectslot {
static void SetName(ALCcontext *context, ALuint id, std::string_view name);
- /* This can be new'd for the context's default effect slot. */
- DEF_NEWDEL(ALeffectslot)
-
#ifdef ALSOFT_EAX
public:
diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp
index fa34e4f9..344c440c 100644
--- a/alc/backends/alsa.cpp
+++ b/alc/backends/alsa.cpp
@@ -444,8 +444,6 @@ struct AlsaPlayback final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(AlsaPlayback)
};
AlsaPlayback::~AlsaPlayback()
@@ -888,8 +886,6 @@ struct AlsaCapture final : public BackendBase {
RingBufferPtr mRing{nullptr};
snd_pcm_sframes_t mLastAvail{0};
-
- DEF_NEWDEL(AlsaCapture)
};
AlsaCapture::~AlsaCapture()
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index 50e3bc66..86c4b89b 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -337,8 +337,6 @@ struct CoreAudioPlayback final : public BackendBase {
uint mFrameSize{0u};
AudioStreamBasicDescription mFormat{}; // This is the OpenAL format as a CoreAudio ASBD
-
- DEF_NEWDEL(CoreAudioPlayback)
};
CoreAudioPlayback::~CoreAudioPlayback()
@@ -623,8 +621,6 @@ struct CoreAudioCapture final : public BackendBase {
std::vector<char> mCaptureData;
RingBufferPtr mRing{nullptr};
-
- DEF_NEWDEL(CoreAudioCapture)
};
CoreAudioCapture::~CoreAudioCapture()
diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp
index 08c849e9..59a59a9f 100644
--- a/alc/backends/dsound.cpp
+++ b/alc/backends/dsound.cpp
@@ -191,8 +191,6 @@ struct DSoundPlayback final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(DSoundPlayback)
};
DSoundPlayback::~DSoundPlayback()
@@ -560,8 +558,6 @@ struct DSoundCapture final : public BackendBase {
DWORD mCursor{0u};
RingBufferPtr mRing;
-
- DEF_NEWDEL(DSoundCapture)
};
DSoundCapture::~DSoundCapture()
diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp
index 1a53da17..eb87b0a7 100644
--- a/alc/backends/jack.cpp
+++ b/alc/backends/jack.cpp
@@ -319,8 +319,6 @@ struct JackPlayback final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(JackPlayback)
};
JackPlayback::~JackPlayback()
diff --git a/alc/backends/loopback.cpp b/alc/backends/loopback.cpp
index 2972fc01..e42e35b0 100644
--- a/alc/backends/loopback.cpp
+++ b/alc/backends/loopback.cpp
@@ -34,8 +34,6 @@ struct LoopbackBackend final : public BackendBase {
bool reset() override;
void start() override;
void stop() override;
-
- DEF_NEWDEL(LoopbackBackend)
};
diff --git a/alc/backends/null.cpp b/alc/backends/null.cpp
index c149820c..f28eaa47 100644
--- a/alc/backends/null.cpp
+++ b/alc/backends/null.cpp
@@ -58,8 +58,6 @@ struct NullBackend final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(NullBackend)
};
int NullBackend::mixerProc()
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 75b6e30d..6b2de909 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -190,8 +190,6 @@ struct OpenSLPlayback final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(OpenSLPlayback)
};
OpenSLPlayback::~OpenSLPlayback()
@@ -595,8 +593,6 @@ struct OpenSLCapture final : public BackendBase {
uint mSplOffset{0u};
uint mFrameSize{0};
-
- DEF_NEWDEL(OpenSLCapture)
};
OpenSLCapture::~OpenSLCapture()
diff --git a/alc/backends/oss.cpp b/alc/backends/oss.cpp
index e6cebec4..8e547497 100644
--- a/alc/backends/oss.cpp
+++ b/alc/backends/oss.cpp
@@ -240,8 +240,6 @@ struct OSSPlayback final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(OSSPlayback)
};
OSSPlayback::~OSSPlayback()
@@ -457,8 +455,6 @@ struct OSScapture final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(OSScapture)
};
OSScapture::~OSScapture()
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index 2c726cbe..9c9323ec 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -1442,8 +1442,6 @@ public:
/* Stop the mainloop so the stream can be properly destroyed. */
if(mLoop) mLoop.stop();
}
-
- DEF_NEWDEL(PipeWirePlayback)
};
@@ -1927,8 +1925,6 @@ class PipeWireCapture final : public BackendBase {
public:
PipeWireCapture(DeviceBase *device) noexcept : BackendBase{device} { }
~PipeWireCapture() final { if(mLoop) mLoop.stop(); }
-
- DEF_NEWDEL(PipeWireCapture)
};
diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp
index 554efe9a..dc9725b0 100644
--- a/alc/backends/portaudio.cpp
+++ b/alc/backends/portaudio.cpp
@@ -95,8 +95,6 @@ struct PortPlayback final : public BackendBase {
PaStream *mStream{nullptr};
PaStreamParameters mParams{};
uint mUpdateSize{0u};
-
- DEF_NEWDEL(PortPlayback)
};
PortPlayback::~PortPlayback()
@@ -256,8 +254,6 @@ struct PortCapture final : public BackendBase {
PaStreamParameters mParams;
RingBufferPtr mRing{nullptr};
-
- DEF_NEWDEL(PortCapture)
};
PortCapture::~PortCapture()
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index b6f0f95d..8533cdb9 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -664,8 +664,6 @@ struct PulsePlayback final : public BackendBase {
pa_stream *mStream{nullptr};
uint mFrameSize{0u};
-
- DEF_NEWDEL(PulsePlayback)
};
PulsePlayback::~PulsePlayback()
@@ -1090,8 +1088,6 @@ struct PulseCapture final : public BackendBase {
pa_sample_spec mSpec{};
pa_stream *mStream{nullptr};
-
- DEF_NEWDEL(PulseCapture)
};
PulseCapture::~PulseCapture()
diff --git a/alc/backends/sdl2.cpp b/alc/backends/sdl2.cpp
index d7f66d93..49b9713e 100644
--- a/alc/backends/sdl2.cpp
+++ b/alc/backends/sdl2.cpp
@@ -67,8 +67,6 @@ struct Sdl2Backend final : public BackendBase {
DevFmtChannels mFmtChans{};
DevFmtType mFmtType{};
uint mUpdateSize{0u};
-
- DEF_NEWDEL(Sdl2Backend)
};
Sdl2Backend::~Sdl2Backend()
diff --git a/alc/backends/sndio.cpp b/alc/backends/sndio.cpp
index d05db2e8..8477ed1f 100644
--- a/alc/backends/sndio.cpp
+++ b/alc/backends/sndio.cpp
@@ -70,8 +70,6 @@ struct SndioPlayback final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(SndioPlayback)
};
SndioPlayback::~SndioPlayback()
@@ -293,8 +291,6 @@ struct SndioCapture final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(SndioCapture)
};
SndioCapture::~SndioCapture()
diff --git a/alc/backends/solaris.cpp b/alc/backends/solaris.cpp
index 2c4a97fd..b29a8cea 100644
--- a/alc/backends/solaris.cpp
+++ b/alc/backends/solaris.cpp
@@ -75,8 +75,6 @@ struct SolarisBackend final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(SolarisBackend)
};
SolarisBackend::~SolarisBackend()
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index 3e9632e0..a164ed24 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -1086,8 +1086,6 @@ struct WasapiPlayback final : public BackendBase, WasapiProxy {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(WasapiPlayback)
};
WasapiPlayback::~WasapiPlayback()
@@ -2123,8 +2121,6 @@ struct WasapiCapture final : public BackendBase, WasapiProxy {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(WasapiCapture)
};
WasapiCapture::~WasapiCapture()
diff --git a/alc/backends/wave.cpp b/alc/backends/wave.cpp
index f3261ed4..11794608 100644
--- a/alc/backends/wave.cpp
+++ b/alc/backends/wave.cpp
@@ -109,8 +109,6 @@ struct WaveBackend final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(WaveBackend)
};
WaveBackend::~WaveBackend()
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp
index 696f7f37..a3d647ec 100644
--- a/alc/backends/winmm.cpp
+++ b/alc/backends/winmm.cpp
@@ -151,8 +151,6 @@ struct WinMMPlayback final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(WinMMPlayback)
};
WinMMPlayback::~WinMMPlayback()
@@ -389,8 +387,6 @@ struct WinMMCapture final : public BackendBase {
std::atomic<bool> mKillNow{true};
std::thread mThread;
-
- DEF_NEWDEL(WinMMCapture)
};
WinMMCapture::~WinMMCapture()
diff --git a/alc/context.h b/alc/context.h
index d923e46e..9f49ceac 100644
--- a/alc/context.h
+++ b/alc/context.h
@@ -230,8 +230,6 @@ public:
/* Default effect that applies to sources that don't have an effect on send 0. */
static ALeffect sDefaultEffect;
- DEF_NEWDEL(ALCcontext)
-
#ifdef ALSOFT_EAX
public:
bool hasEax() const noexcept { return mEaxIsInitialized; }
diff --git a/alc/device.h b/alc/device.h
index 66f37a7e..0f36304b 100644
--- a/alc/device.h
+++ b/alc/device.h
@@ -148,8 +148,6 @@ struct ALCdevice : public al::intrusive_ref<ALCdevice>, DeviceBase {
template<typename T>
inline std::optional<T> configValue(const char *block, const char *key) = delete;
-
- DEF_NEWDEL(ALCdevice)
};
template<>
diff --git a/alc/effects/autowah.cpp b/alc/effects/autowah.cpp
index 6d66f99f..20c790b6 100644
--- a/alc/effects/autowah.cpp
+++ b/alc/effects/autowah.cpp
@@ -88,8 +88,6 @@ struct AutowahState final : public EffectState {
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)
};
void AutowahState::deviceUpdate(const DeviceBase*, const BufferStorage*)
diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp
index 098b33a1..d3bcd394 100644
--- a/alc/effects/chorus.cpp
+++ b/alc/effects/chorus.cpp
@@ -84,8 +84,6 @@ struct ChorusState final : public EffectState {
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)
};
void ChorusState::deviceUpdate(const DeviceBase *Device, const BufferStorage*)
diff --git a/alc/effects/compressor.cpp b/alc/effects/compressor.cpp
index 47ef64e9..eb8605ce 100644
--- a/alc/effects/compressor.cpp
+++ b/alc/effects/compressor.cpp
@@ -82,8 +82,6 @@ struct CompressorState final : public EffectState {
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)
};
void CompressorState::deviceUpdate(const DeviceBase *device, const BufferStorage*)
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index 1fcb419c..f497ebce 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -233,8 +233,6 @@ struct ConvolutionState final : public EffectState {
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
const al::span<FloatBufferLine> samplesOut) override;
-
- DEF_NEWDEL(ConvolutionState)
};
void ConvolutionState::NormalMix(const al::span<FloatBufferLine> samplesOut,
diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp
index 1b8b3977..609776ad 100644
--- a/alc/effects/dedicated.cpp
+++ b/alc/effects/dedicated.cpp
@@ -56,8 +56,6 @@ struct DedicatedState final : public EffectState {
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)
};
void DedicatedState::deviceUpdate(const DeviceBase*, const BufferStorage*)
diff --git a/alc/effects/distortion.cpp b/alc/effects/distortion.cpp
index 9ef9de25..5e8253e8 100644
--- a/alc/effects/distortion.cpp
+++ b/alc/effects/distortion.cpp
@@ -61,8 +61,6 @@ struct DistortionState final : public EffectState {
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)
};
void DistortionState::deviceUpdate(const DeviceBase*, const BufferStorage*)
diff --git a/alc/effects/echo.cpp b/alc/effects/echo.cpp
index fe6d8258..8def5e71 100644
--- a/alc/effects/echo.cpp
+++ b/alc/effects/echo.cpp
@@ -73,8 +73,6 @@ struct EchoState final : public EffectState {
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)
};
void EchoState::deviceUpdate(const DeviceBase *Device, const BufferStorage*)
diff --git a/alc/effects/equalizer.cpp b/alc/effects/equalizer.cpp
index a4a1777a..9cb42470 100644
--- a/alc/effects/equalizer.cpp
+++ b/alc/effects/equalizer.cpp
@@ -106,8 +106,6 @@ struct EqualizerState final : public EffectState {
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)
};
void EqualizerState::deviceUpdate(const DeviceBase*, const BufferStorage*)
diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp
index d121885b..2add8379 100644
--- a/alc/effects/fshifter.cpp
+++ b/alc/effects/fshifter.cpp
@@ -103,8 +103,6 @@ struct FshifterState final : public EffectState {
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)
};
void FshifterState::deviceUpdate(const DeviceBase*, const BufferStorage*)
diff --git a/alc/effects/modulator.cpp b/alc/effects/modulator.cpp
index 3c612a6e..29c225e3 100644
--- a/alc/effects/modulator.cpp
+++ b/alc/effects/modulator.cpp
@@ -105,8 +105,6 @@ struct ModulatorState final : public EffectState {
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)
};
template<>
diff --git a/alc/effects/null.cpp b/alc/effects/null.cpp
index 12d1688e..964afe47 100644
--- a/alc/effects/null.cpp
+++ b/alc/effects/null.cpp
@@ -25,8 +25,6 @@ struct NullState final : public EffectState {
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
const al::span<FloatBufferLine> samplesOut) override;
-
- DEF_NEWDEL(NullState)
};
/* This constructs the effect state. It's called when the object is first
diff --git a/alc/effects/pshifter.cpp b/alc/effects/pshifter.cpp
index c7d662c7..24171082 100644
--- a/alc/effects/pshifter.cpp
+++ b/alc/effects/pshifter.cpp
@@ -112,8 +112,6 @@ struct PshifterState final : public EffectState {
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)
};
void PshifterState::deviceUpdate(const DeviceBase*, const BufferStorage*)
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 43451ec8..4318fa28 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -662,8 +662,6 @@ struct ReverbState final : public EffectState {
const EffectTarget target) override;
void process(const size_t samplesToDo, const al::span<const FloatBufferLine> samplesIn,
const al::span<FloatBufferLine> samplesOut) override;
-
- DEF_NEWDEL(ReverbState)
};
/**************************************
diff --git a/alc/effects/vmorpher.cpp b/alc/effects/vmorpher.cpp
index 6cf862c2..adbcdeab 100644
--- a/alc/effects/vmorpher.cpp
+++ b/alc/effects/vmorpher.cpp
@@ -173,8 +173,6 @@ struct VmorpherState final : public EffectState {
static std::array<FormantFilter,NumFormants> getFiltersByPhoneme(VMorpherPhenome phoneme,
float frequency, float pitch) noexcept;
-
- DEF_NEWDEL(VmorpherState)
};
std::array<FormantFilter,NumFormants> VmorpherState::getFiltersByPhoneme(VMorpherPhenome phoneme,
diff --git a/common/almalloc.h b/common/almalloc.h
index b3d8dd58..7ac02bf1 100644
--- a/common/almalloc.h
+++ b/common/almalloc.h
@@ -26,19 +26,6 @@ void *al_calloc(size_t alignment, size_t size);
void operator delete(void*) noexcept = delete; \
void operator delete[](void*) noexcept = delete;
-#define DEF_NEWDEL(T) \
- void *operator new(size_t size) \
- { \
- static_assert(&operator new == &T::operator new, \
- "Incorrect container type specified"); \
- if(void *ret{al_malloc(alignof(T), size)}) \
- return ret; \
- throw std::bad_alloc(); \
- } \
- void *operator new[](size_t size) { return operator new(size); } \
- void operator delete(void *block) noexcept { al_free(block); } \
- void operator delete[](void *block) noexcept { operator delete(block); }
-
#define DEF_PLACE_NEWDEL \
void *operator new(size_t) = delete; \
void *operator new[](size_t) = delete; \
diff --git a/core/bformatdec.h b/core/bformatdec.h
index 97e7c9e4..35cf20a2 100644
--- a/core/bformatdec.h
+++ b/core/bformatdec.h
@@ -58,8 +58,6 @@ public:
static std::unique_ptr<BFormatDec> Create(const size_t inchans,
const al::span<const ChannelDec> coeffs, const al::span<const ChannelDec> coeffslf,
const float xover_f0norm, std::unique_ptr<FrontStablizer> stablizer);
-
- DEF_NEWDEL(BFormatDec)
};
#endif /* CORE_BFORMATDEC_H */
diff --git a/core/context.h b/core/context.h
index 15897ff3..0b830205 100644
--- a/core/context.h
+++ b/core/context.h
@@ -27,9 +27,9 @@ struct VoiceChange;
struct VoicePropsItem;
-constexpr float SpeedOfSoundMetersPerSec{343.3f};
+inline constexpr float SpeedOfSoundMetersPerSec{343.3f};
-constexpr float AirAbsorbGainHF{0.99426f}; /* -0.05dB */
+inline constexpr float AirAbsorbGainHF{0.99426f}; /* -0.05dB */
enum class DistanceModel : unsigned char {
Disable,
@@ -57,8 +57,6 @@ struct ContextProps {
DistanceModel mDistanceModel;
std::atomic<ContextProps*> next;
-
- DEF_NEWDEL(ContextProps)
};
struct ContextParams {
diff --git a/core/device.h b/core/device.h
index 93d64aef..d85b9254 100644
--- a/core/device.h
+++ b/core/device.h
@@ -380,8 +380,6 @@ struct DeviceBase {
[[nodiscard]] auto channelIdxByName(Channel chan) const noexcept -> uint8_t
{ return RealOut.ChannelIndex[chan]; }
- DISABLE_ALLOC
-
private:
uint renderSamples(const uint numSamples);
};
diff --git a/core/effectslot.h b/core/effectslot.h
index 3362ba85..cf8503ff 100644
--- a/core/effectslot.h
+++ b/core/effectslot.h
@@ -46,8 +46,6 @@ struct EffectSlotProps {
al::intrusive_ptr<EffectState> State;
std::atomic<EffectSlotProps*> next;
-
- DEF_NEWDEL(EffectSlotProps)
};
@@ -83,8 +81,6 @@ struct EffectSlot {
static EffectSlotArray *CreatePtrArray(size_t count) noexcept;
-
- DEF_NEWDEL(EffectSlot)
};
#endif /* CORE_EFFECTSLOT_H */
diff --git a/core/uhjfilter.h b/core/uhjfilter.h
index 29838410..58576beb 100644
--- a/core/uhjfilter.h
+++ b/core/uhjfilter.h
@@ -110,8 +110,6 @@ struct UhjEncoderIIR final : public UhjEncoderBase {
*/
void encode(float *LeftOut, float *RightOut, const al::span<const float*const,3> InSamples,
const size_t SamplesToDo) override;
-
- DEF_NEWDEL(UhjEncoderIIR)
};
@@ -158,8 +156,6 @@ struct UhjDecoder final : public DecoderBase {
*/
void decode(const al::span<float*> samples, const size_t samplesToDo,
const bool updateState) override;
-
- DEF_NEWDEL(UhjDecoder)
};
struct UhjDecoderIIR final : public DecoderBase {
@@ -184,8 +180,6 @@ struct UhjDecoderIIR final : public DecoderBase {
void decode(const al::span<float*> samples, const size_t samplesToDo,
const bool updateState) override;
-
- DEF_NEWDEL(UhjDecoderIIR)
};
template<size_t N>
@@ -210,8 +204,6 @@ struct UhjStereoDecoder final : public DecoderBase {
*/
void decode(const al::span<float*> samples, const size_t samplesToDo,
const bool updateState) override;
-
- DEF_NEWDEL(UhjStereoDecoder)
};
struct UhjStereoDecoderIIR final : public DecoderBase {
@@ -231,8 +223,6 @@ struct UhjStereoDecoderIIR final : public DecoderBase {
void decode(const al::span<float*> samples, const size_t samplesToDo,
const bool updateState) override;
-
- DEF_NEWDEL(UhjStereoDecoderIIR)
};
#endif /* CORE_UHJFILTER_H */
diff --git a/core/voice.h b/core/voice.h
index 6c953804..2ecc8148 100644
--- a/core/voice.h
+++ b/core/voice.h
@@ -160,8 +160,6 @@ struct VoiceProps {
struct VoicePropsItem : public VoiceProps {
std::atomic<VoicePropsItem*> next{nullptr};
-
- DEF_NEWDEL(VoicePropsItem)
};
enum : uint {
@@ -271,8 +269,6 @@ struct Voice {
void prepare(DeviceBase *device);
static void InitMixer(std::optional<std::string> resampler);
-
- DEF_NEWDEL(Voice)
};
extern Resampler ResamplerDefault;
diff --git a/core/voice_change.h b/core/voice_change.h
index ddc6186f..e97c48f3 100644
--- a/core/voice_change.h
+++ b/core/voice_change.h
@@ -3,8 +3,6 @@
#include <atomic>
-#include "almalloc.h"
-
struct Voice;
using uint = unsigned int;
@@ -24,8 +22,6 @@ struct VoiceChange {
VChangeState mState{};
std::atomic<VoiceChange*> mNext{nullptr};
-
- DEF_NEWDEL(VoiceChange)
};
#endif /* VOICE_CHANGE_H */
diff --git a/utils/uhjdecoder.cpp b/utils/uhjdecoder.cpp
index feca0a35..801425e0 100644
--- a/utils/uhjdecoder.cpp
+++ b/utils/uhjdecoder.cpp
@@ -35,7 +35,6 @@
#include "albit.h"
#include "alcomplex.h"
-#include "almalloc.h"
#include "alnumbers.h"
#include "alspan.h"
#include "vector.h"
@@ -129,8 +128,6 @@ struct UhjDecoder {
const al::span<FloatBufferLine> OutSamples, const std::size_t SamplesToDo);
void decode2(const float *RESTRICT InSamples, const al::span<FloatBufferLine> OutSamples,
const std::size_t SamplesToDo);
-
- DEF_NEWDEL(UhjDecoder)
};
const PhaseShifterT<UhjDecoder::sFilterDelay*2> PShift{};
diff --git a/utils/uhjencoder.cpp b/utils/uhjencoder.cpp
index 8673dd59..6a7b1fa9 100644
--- a/utils/uhjencoder.cpp
+++ b/utils/uhjencoder.cpp
@@ -33,7 +33,6 @@
#include <utility>
#include <vector>
-#include "almalloc.h"
#include "alnumbers.h"
#include "alspan.h"
#include "opthelpers.h"
@@ -82,8 +81,6 @@ struct UhjEncoder {
void encode(const al::span<FloatBufferLine> OutSamples,
const al::span<FloatBufferLine,4> InSamples, const size_t SamplesToDo);
-
- DEF_NEWDEL(UhjEncoder)
};
const PhaseShifterT<UhjEncoder::sFilterDelay*2> PShift{};