From 68062432ed7cbd2f97f638c0196dfc34a9e459bb Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 25 Mar 2021 18:35:20 +0100 Subject: [PATCH] Move some utility files --- benchmarks/BM_ADSR.cpp | 14 -------------- benchmarks/BM_add.cpp | 4 ++-- benchmarks/BM_allWithin.cpp | 4 ++-- benchmarks/BM_clamp.cpp | 4 ++-- benchmarks/BM_stringResonator.cpp | 2 +- demos/EQ.cpp | 8 +++----- demos/Filter.cpp | 8 +++----- src/CMakeLists.txt | 12 ++++++------ src/sfizz/ADSREnvelope.h | 2 +- src/sfizz/AudioBuffer.h | 4 ++-- src/sfizz/AudioSpan.h | 4 ++-- src/sfizz/BeatClock.cpp | 2 +- src/sfizz/Buffer.h | 2 +- src/sfizz/BufferPool.h | 2 +- src/sfizz/CCMap.h | 2 +- src/sfizz/Curve.cpp | 4 ++-- src/sfizz/EGDescription.h | 4 ++-- src/sfizz/EQPool.cpp | 6 +++--- src/sfizz/FileId.cpp | 2 +- src/sfizz/FilePool.cpp | 10 +++++----- src/sfizz/FilePool.h | 12 ++++++------ src/sfizz/FilterPool.cpp | 4 ++-- src/sfizz/Logger.cpp | 6 +++--- src/sfizz/Logger.h | 6 +++--- src/sfizz/MathHelpers.h | 4 ++-- src/sfizz/MidiState.cpp | 4 ++-- src/sfizz/OnePoleFilter.h | 4 ++-- src/sfizz/Opcode.cpp | 10 +++++----- src/sfizz/Opcode.h | 4 ++-- src/sfizz/OpcodeCleanup.cpp | 8 ++++---- src/sfizz/OpcodeCleanup.re | 8 ++++---- src/sfizz/Oversampler.h | 8 ++++---- src/sfizz/OversamplerHelpers.h | 2 +- src/sfizz/PolyphonyGroup.cpp | 1 + src/sfizz/PolyphonyGroup.h | 3 +-- src/sfizz/Range.h | 2 +- src/sfizz/Region.cpp | 10 +++++----- src/sfizz/Region.h | 2 +- src/sfizz/RegionSet.h | 2 +- src/sfizz/SIMDHelpers.cpp | 2 +- src/sfizz/SIMDHelpers.h | 2 +- src/sfizz/SfzFilter.cpp | 6 +++--- src/sfizz/SfzHelpers.h | 16 ++++++++-------- src/sfizz/SisterVoiceRing.h | 2 +- src/sfizz/Synth.cpp | 6 +++--- src/sfizz/Synth.h | 2 +- src/sfizz/SynthMessaging.cpp | 2 +- src/sfizz/Tuning.cpp | 4 ++-- src/sfizz/Voice.cpp | 2 +- src/sfizz/Voice.h | 2 +- src/sfizz/Wavetables.h | 2 +- src/sfizz/effects/Apan.cpp | 2 +- src/sfizz/effects/Eq.cpp | 4 ++-- src/sfizz/effects/Filter.cpp | 4 ++-- src/sfizz/modulations/ModKeyHash.cpp | 2 +- src/sfizz/modulations/ModMatrix.cpp | 2 +- src/sfizz/modulations/sources/ADSREnvelope.cpp | 4 +--- src/sfizz/modulations/sources/Controller.cpp | 2 +- src/sfizz/modulations/sources/FlexEnvelope.cpp | 2 +- src/sfizz/modulations/sources/LFO.cpp | 2 +- src/sfizz/sfizz_wrapper.cpp | 2 +- src/sfizz/{ => utility}/Debug.h | 0 src/sfizz/{ => utility}/LeakDetector.h | 0 src/sfizz/{ => utility}/Macros.h | 0 src/sfizz/utility/NumericId.h | 2 +- src/sfizz/{ => utility}/StringViewHelpers.h | 0 src/sfizz/{ => utility}/SwapAndPop.h | 0 tests/HelpersT.cpp | 2 +- tests/SwapAndPopT.cpp | 2 +- 69 files changed, 130 insertions(+), 150 deletions(-) rename src/sfizz/{ => utility}/Debug.h (100%) rename src/sfizz/{ => utility}/LeakDetector.h (100%) rename src/sfizz/{ => utility}/Macros.h (100%) rename src/sfizz/{ => utility}/StringViewHelpers.h (100%) rename src/sfizz/{ => utility}/SwapAndPop.h (100%) diff --git a/benchmarks/BM_ADSR.cpp b/benchmarks/BM_ADSR.cpp index 3dcfd6b1..0977c149 100644 --- a/benchmarks/BM_ADSR.cpp +++ b/benchmarks/BM_ADSR.cpp @@ -40,19 +40,6 @@ public: std::vector output; }; -BENCHMARK_DEFINE_F(EnvelopeFixture, Scalar)(benchmark::State& state) -{ - for (auto _ : state) { - envelope.reset(region.amplitudeEG, region, midiState, 0, 0, sampleRate); - envelope.startRelease(releaseTime); - for (int offset = 0; offset < envelopeSize; offset += static_cast(state.range(0))) - for (auto& out: output) - out = envelope.getNextValue(); - benchmark::DoNotOptimize(output); - } - state.counters["Blocks"] = benchmark::Counter(envelopeSize / static_cast(state.range(0)), benchmark::Counter::kIsIterationInvariantRate); -} - BENCHMARK_DEFINE_F(EnvelopeFixture, Block)(benchmark::State& state) { for (auto _ : state) { @@ -66,6 +53,5 @@ BENCHMARK_DEFINE_F(EnvelopeFixture, Block)(benchmark::State& state) state.counters["Blocks"] = benchmark::Counter(envelopeSize / static_cast(state.range(0)), benchmark::Counter::kIsIterationInvariantRate); } -BENCHMARK_REGISTER_F(EnvelopeFixture, Scalar)->RangeMultiplier(2)->Range((2 << 6), (2 << 11)); BENCHMARK_REGISTER_F(EnvelopeFixture, Block)->RangeMultiplier(2)->Range((2 << 6), (2 << 11)); BENCHMARK_MAIN(); diff --git a/benchmarks/BM_add.cpp b/benchmarks/BM_add.cpp index 85277c1c..09a84b69 100644 --- a/benchmarks/BM_add.cpp +++ b/benchmarks/BM_add.cpp @@ -5,13 +5,13 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "SIMDHelpers.h" -#include "Macros.h" +#include "utility/Macros.h" #include #include #include #include -#include #include +#include class AddArray : public benchmark::Fixture { public: diff --git a/benchmarks/BM_allWithin.cpp b/benchmarks/BM_allWithin.cpp index c1b3bec0..c9ecfda0 100644 --- a/benchmarks/BM_allWithin.cpp +++ b/benchmarks/BM_allWithin.cpp @@ -5,13 +5,13 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "SIMDHelpers.h" -#include "Macros.h" +#include "utility/Macros.h" #include #include #include #include -#include #include +#include class WithinArray : public benchmark::Fixture { public: diff --git a/benchmarks/BM_clamp.cpp b/benchmarks/BM_clamp.cpp index beb66ae5..6bc73dac 100644 --- a/benchmarks/BM_clamp.cpp +++ b/benchmarks/BM_clamp.cpp @@ -5,13 +5,13 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "SIMDHelpers.h" -#include "Macros.h" +#include "utility/Macros.h" #include #include #include #include -#include #include +#include class ClampArray : public benchmark::Fixture { public: diff --git a/benchmarks/BM_stringResonator.cpp b/benchmarks/BM_stringResonator.cpp index 1d779321..0c8f938b 100644 --- a/benchmarks/BM_stringResonator.cpp +++ b/benchmarks/BM_stringResonator.cpp @@ -4,10 +4,10 @@ // license. You should have receive a LICENSE.md file along with the code. // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz -#include "Macros.h" #include "ScopedFTZ.h" #include "MathHelpers.h" #include "SIMDConfig.h" +#include "utility/Macros.h" #include "effects/impl/ResonantArray.h" #include "effects/impl/ResonantArraySSE.h" #include "effects/impl/ResonantArrayAVX.h" diff --git a/demos/EQ.cpp b/demos/EQ.cpp index 23082efe..bb4269f8 100644 --- a/demos/EQ.cpp +++ b/demos/EQ.cpp @@ -1,15 +1,13 @@ #include "sfizz/SfzFilter.h" #include "sfizz/Buffer.h" #include "sfizz/SIMDHelpers.h" -#include "ghc/filesystem.hpp" -#include "cxxopts.hpp" -#include "sfizz/StringViewHelpers.h" +#include "sfizz/utility/StringViewHelpers.h" #include +#include +#include #include #include -namespace fs = ghc::filesystem; - int main(int argc, char** argv) { (void)argc; diff --git a/demos/Filter.cpp b/demos/Filter.cpp index 8104aa0b..e896a0db 100644 --- a/demos/Filter.cpp +++ b/demos/Filter.cpp @@ -1,15 +1,13 @@ #include "sfizz/SfzFilter.h" #include "sfizz/Buffer.h" #include "sfizz/SIMDHelpers.h" -#include "ghc/filesystem.hpp" -#include "cxxopts.hpp" -#include "sfizz/StringViewHelpers.h" +#include "sfizz/utility/StringViewHelpers.h" #include +#include +#include #include #include -namespace fs = ghc::filesystem; - int main(int argc, char** argv) { (void)argc; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 66fcb958..64d616aa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,8 +24,12 @@ set(SFIZZ_HEADERS sfizz/CCMap.h sfizz/Config.h sfizz/Curve.h - sfizz/Debug.h + sfizz/utility/Debug.h + sfizz/utility/LeakDetector.h + sfizz/utility/Macros.h sfizz/utility/NumericId.h + sfizz/utility/StringViewHelpers.h + sfizz/utility/SwapAndPop.h sfizz/utility/XmlHelpers.h sfizz/modulations/ModId.h sfizz/modulations/ModKey.h @@ -103,7 +107,6 @@ set(SFIZZ_HEADERS sfizz/SIMDHelpers.h sfizz/SisterVoiceRing.h sfizz/Smoothers.h - sfizz/SwapAndPop.h sfizz/Synth.h sfizz/SynthConfig.h sfizz/SynthPrivate.h @@ -190,15 +193,12 @@ sfizz_add_simd_sources(SFIZZ_SOURCES ".") # Parser core library set(SFIZZ_PARSER_HEADERS sfizz/Defaults.h - sfizz/LeakDetector.h sfizz/Range.h sfizz/Opcode.h - sfizz/Macros.h sfizz/parser/Parser.h sfizz/parser/ParserPrivate.h sfizz/parser/ParserPrivate.hpp - sfizz/SfzHelpers.h - sfizz/StringViewHelpers.h) + sfizz/SfzHelpers.h) set(SFIZZ_PARSER_SOURCES sfizz/Opcode.cpp diff --git a/src/sfizz/ADSREnvelope.h b/src/sfizz/ADSREnvelope.h index f5f435fb..341ec021 100644 --- a/src/sfizz/ADSREnvelope.h +++ b/src/sfizz/ADSREnvelope.h @@ -5,9 +5,9 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #pragma once -#include "LeakDetector.h" #include "Region.h" #include "MidiState.h" +#include "utility/LeakDetector.h" #include namespace sfz { /** diff --git a/src/sfizz/AudioBuffer.h b/src/sfizz/AudioBuffer.h index 9488243e..3d802e3d 100644 --- a/src/sfizz/AudioBuffer.h +++ b/src/sfizz/AudioBuffer.h @@ -7,9 +7,9 @@ #pragma once #include "Buffer.h" #include "Config.h" -#include "Debug.h" -#include "LeakDetector.h" #include "SIMDHelpers.h" +#include "utility/Debug.h" +#include "utility/LeakDetector.h" #include "absl/types/span.h" #include "absl/memory/memory.h" #include diff --git a/src/sfizz/AudioSpan.h b/src/sfizz/AudioSpan.h index fa879312..dd74d9c5 100644 --- a/src/sfizz/AudioSpan.h +++ b/src/sfizz/AudioSpan.h @@ -8,9 +8,9 @@ #include "AudioBuffer.h" #include "Buffer.h" #include "Config.h" -#include "Debug.h" -#include "LeakDetector.h" #include "SIMDHelpers.h" +#include "utility/Debug.h" +#include "utility/LeakDetector.h" #include "absl/types/span.h" #include #include diff --git a/src/sfizz/BeatClock.cpp b/src/sfizz/BeatClock.cpp index 2b1d635e..40ed6a33 100644 --- a/src/sfizz/BeatClock.cpp +++ b/src/sfizz/BeatClock.cpp @@ -7,7 +7,7 @@ #include "BeatClock.h" #include "SIMDHelpers.h" #include "Config.h" -#include "Debug.h" +#include "utility/Debug.h" #include #include diff --git a/src/sfizz/Buffer.h b/src/sfizz/Buffer.h index 1f2dd2d3..399e04ae 100644 --- a/src/sfizz/Buffer.h +++ b/src/sfizz/Buffer.h @@ -25,7 +25,7 @@ #pragma once #include "Config.h" -#include "LeakDetector.h" +#include "utility/LeakDetector.h" #include #include #include diff --git a/src/sfizz/BufferPool.h b/src/sfizz/BufferPool.h index 51d40794..afd59b0b 100644 --- a/src/sfizz/BufferPool.h +++ b/src/sfizz/BufferPool.h @@ -6,10 +6,10 @@ #pragma once #include "Config.h" -#include "Debug.h" #include "Buffer.h" #include "AudioBuffer.h" #include "AudioSpan.h" +#include "utility/Debug.h" #include #include #include diff --git a/src/sfizz/CCMap.h b/src/sfizz/CCMap.h index 8354ad64..1f08fa41 100644 --- a/src/sfizz/CCMap.h +++ b/src/sfizz/CCMap.h @@ -5,8 +5,8 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #pragma once -#include "LeakDetector.h" #include "SfzHelpers.h" +#include "utility/LeakDetector.h" #include #include #include diff --git a/src/sfizz/Curve.cpp b/src/sfizz/Curve.cpp index 30418d12..39f6ac53 100644 --- a/src/sfizz/Curve.cpp +++ b/src/sfizz/Curve.cpp @@ -7,8 +7,8 @@ #include "Curve.h" #include "Opcode.h" #include "SIMDHelpers.h" -#include "Debug.h" -#include "spline/spline.h" +#include "utility/Debug.h" +#include #include namespace sfz diff --git a/src/sfizz/EGDescription.h b/src/sfizz/EGDescription.h index 5bf81ca4..ef87057c 100644 --- a/src/sfizz/EGDescription.h +++ b/src/sfizz/EGDescription.h @@ -26,10 +26,10 @@ #pragma once #include "Config.h" #include "Defaults.h" -#include "Macros.h" -#include "LeakDetector.h" #include "SfzHelpers.h" #include "MidiState.h" +#include "utility/Macros.h" +#include "utility/LeakDetector.h" #include namespace sfz { diff --git a/src/sfizz/EQPool.cpp b/src/sfizz/EQPool.cpp index bca8c711..88b00e62 100644 --- a/src/sfizz/EQPool.cpp +++ b/src/sfizz/EQPool.cpp @@ -1,8 +1,8 @@ #include "EQPool.h" -#include -#include "absl/algorithm/container.h" #include "SIMDHelpers.h" -#include "SwapAndPop.h" +#include "utility/SwapAndPop.h" +#include +#include sfz::EQHolder::EQHolder(Resources& resources) : resources(resources) diff --git a/src/sfizz/FileId.cpp b/src/sfizz/FileId.cpp index 13dca994..81e739ce 100644 --- a/src/sfizz/FileId.cpp +++ b/src/sfizz/FileId.cpp @@ -5,7 +5,7 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "FileId.h" -#include "StringViewHelpers.h" +#include "utility/StringViewHelpers.h" #include size_t std::hash::operator()(const sfz::FileId &id) const diff --git a/src/sfizz/FilePool.cpp b/src/sfizz/FilePool.cpp index 50617169..db5688c0 100644 --- a/src/sfizz/FilePool.cpp +++ b/src/sfizz/FilePool.cpp @@ -28,14 +28,14 @@ #include "Buffer.h" #include "AudioBuffer.h" #include "AudioSpan.h" -#include "SwapAndPop.h" #include "Config.h" -#include "Debug.h" #include "Oversampler.h" +#include "utility/SwapAndPop.h" +#include "utility/Debug.h" #include -#include "absl/types/span.h" -#include "absl/strings/match.h" -#include "absl/memory/memory.h" +#include +#include +#include #include #include #include diff --git a/src/sfizz/FilePool.h b/src/sfizz/FilePool.h index 6936fb63..938061bb 100644 --- a/src/sfizz/FilePool.h +++ b/src/sfizz/FilePool.h @@ -26,20 +26,20 @@ #pragma once #include "Config.h" #include "Defaults.h" -#include "LeakDetector.h" #include "RTSemaphore.h" #include "AudioBuffer.h" #include "AudioSpan.h" #include "FileId.h" #include "FileMetadata.h" #include "SIMDHelpers.h" -#include -#include "ghc/fs_std.hpp" +#include "Logger.h" +#include "SpinMutex.h" +#include "utility/LeakDetector.h" +#include #include #include -#include "absl/strings/string_view.h" -#include "atomic_queue/atomic_queue.h" -#include "Logger.h" +#include +#include #include #include #include diff --git a/src/sfizz/FilterPool.cpp b/src/sfizz/FilterPool.cpp index 75044278..76667bd0 100644 --- a/src/sfizz/FilterPool.cpp +++ b/src/sfizz/FilterPool.cpp @@ -1,7 +1,7 @@ #include "FilterPool.h" #include "SIMDHelpers.h" -#include "SwapAndPop.h" -#include "absl/algorithm/container.h" +#include "utility/SwapAndPop.h" +#include #include #include diff --git a/src/sfizz/Logger.cpp b/src/sfizz/Logger.cpp index 89e77767..780ad81e 100644 --- a/src/sfizz/Logger.cpp +++ b/src/sfizz/Logger.cpp @@ -5,9 +5,9 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "Logger.h" -#include "Debug.h" -#include "absl/algorithm/container.h" -#include "ghc/fs_std.hpp" +#include "utility/Debug.h" +#include +#include #include #include #include diff --git a/src/sfizz/Logger.h b/src/sfizz/Logger.h index aa0d3953..c851dbbe 100644 --- a/src/sfizz/Logger.h +++ b/src/sfizz/Logger.h @@ -6,14 +6,14 @@ #pragma once #include "Config.h" -#include "LeakDetector.h" -#include "atomic_queue/atomic_queue.h" +#include "utility/LeakDetector.h" +#include +#include #include #include #include #include #include -#include "absl/strings/string_view.h" namespace sfz { diff --git a/src/sfizz/MathHelpers.h b/src/sfizz/MathHelpers.h index fa86b8a4..0d2fa1b3 100644 --- a/src/sfizz/MathHelpers.h +++ b/src/sfizz/MathHelpers.h @@ -9,10 +9,10 @@ * @brief Contains math helper functions and math constants */ #pragma once -#include "Debug.h" #include "Config.h" -#include "Macros.h" #include "SIMDConfig.h" +#include "utility/Debug.h" +#include "utility/Macros.h" #include "absl/types/span.h" #include #include diff --git a/src/sfizz/MidiState.cpp b/src/sfizz/MidiState.cpp index c8df355a..6da30f3f 100644 --- a/src/sfizz/MidiState.cpp +++ b/src/sfizz/MidiState.cpp @@ -5,8 +5,8 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "MidiState.h" -#include "Macros.h" -#include "Debug.h" +#include "utility/Macros.h" +#include "utility/Debug.h" sfz::MidiState::MidiState() { diff --git a/src/sfizz/OnePoleFilter.h b/src/sfizz/OnePoleFilter.h index 603363a5..802890de 100644 --- a/src/sfizz/OnePoleFilter.h +++ b/src/sfizz/OnePoleFilter.h @@ -6,9 +6,9 @@ #pragma once #include "Config.h" -#include "Debug.h" #include "MathHelpers.h" -#include "Macros.h" +#include "utility/Debug.h" +#include "utility/Macros.h" #include #include diff --git a/src/sfizz/Opcode.cpp b/src/sfizz/Opcode.cpp index e274cd52..ad15e4e9 100644 --- a/src/sfizz/Opcode.cpp +++ b/src/sfizz/Opcode.cpp @@ -6,11 +6,11 @@ #include "Opcode.h" #include "LFODescription.h" -#include "StringViewHelpers.h" -#include "Debug.h" -#include "absl/strings/ascii.h" -#include "absl/strings/match.h" -#include "absl/strings/str_cat.h" +#include "utility/StringViewHelpers.h" +#include "utility/Debug.h" +#include +#include +#include #include #include #include diff --git a/src/sfizz/Opcode.h b/src/sfizz/Opcode.h index 0982a678..bc860d5f 100644 --- a/src/sfizz/Opcode.h +++ b/src/sfizz/Opcode.h @@ -6,10 +6,10 @@ #pragma once #include "Defaults.h" -#include "LeakDetector.h" #include "Range.h" #include "SfzHelpers.h" -#include "StringViewHelpers.h" +#include "utility/LeakDetector.h" +#include "utility/StringViewHelpers.h" #include "absl/types/optional.h" #include "absl/meta/type_traits.h" #include "absl/strings/ascii.h" diff --git a/src/sfizz/OpcodeCleanup.cpp b/src/sfizz/OpcodeCleanup.cpp index b5945440..1d753161 100644 --- a/src/sfizz/OpcodeCleanup.cpp +++ b/src/sfizz/OpcodeCleanup.cpp @@ -8,10 +8,10 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "Opcode.h" -#include "Macros.h" -#include "absl/strings/string_view.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/ascii.h" +#include "utility/Macros.h" +#include +#include +#include #include namespace sfz { diff --git a/src/sfizz/OpcodeCleanup.re b/src/sfizz/OpcodeCleanup.re index 36d933e2..d3bdb12e 100644 --- a/src/sfizz/OpcodeCleanup.re +++ b/src/sfizz/OpcodeCleanup.re @@ -6,10 +6,10 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "Opcode.h" -#include "Macros.h" -#include "absl/strings/string_view.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/ascii.h" +#include "utility/Macros.h" +#include +#include +#include #include namespace sfz { diff --git a/src/sfizz/Oversampler.h b/src/sfizz/Oversampler.h index f6890ad2..7f45f8c0 100644 --- a/src/sfizz/Oversampler.h +++ b/src/sfizz/Oversampler.h @@ -5,14 +5,14 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #pragma once -#include -#include -#include "absl/types/span.h" -#include "Debug.h" #include "Buffer.h" #include "AudioBuffer.h" #include "AudioSpan.h" #include "Config.h" +#include "utility/Debug.h" +#include +#include +#include namespace sfz { class AudioReader; diff --git a/src/sfizz/OversamplerHelpers.h b/src/sfizz/OversamplerHelpers.h index ae7e6771..c7d27a3e 100644 --- a/src/sfizz/OversamplerHelpers.h +++ b/src/sfizz/OversamplerHelpers.h @@ -1,7 +1,7 @@ #pragma once #include "SIMDConfig.h" #include "Config.h" -#include "Debug.h" +#include "utility/Debug.h" #include #include diff --git a/src/sfizz/PolyphonyGroup.cpp b/src/sfizz/PolyphonyGroup.cpp index dcb608f8..4d3ceb74 100644 --- a/src/sfizz/PolyphonyGroup.cpp +++ b/src/sfizz/PolyphonyGroup.cpp @@ -1,4 +1,5 @@ #include "PolyphonyGroup.h" +#include sfz::PolyphonyGroup::PolyphonyGroup() { diff --git a/src/sfizz/PolyphonyGroup.h b/src/sfizz/PolyphonyGroup.h index 015c3a75..a3925443 100644 --- a/src/sfizz/PolyphonyGroup.h +++ b/src/sfizz/PolyphonyGroup.h @@ -9,8 +9,7 @@ #include "Config.h" #include "Region.h" #include "Voice.h" -#include "SwapAndPop.h" -#include "absl/algorithm/container.h" +#include "utility/SwapAndPop.h" namespace sfz { diff --git a/src/sfizz/Range.h b/src/sfizz/Range.h index 258323a8..8f53481d 100644 --- a/src/sfizz/Range.h +++ b/src/sfizz/Range.h @@ -6,7 +6,7 @@ #pragma once #include "MathHelpers.h" -#include "Macros.h" +#include "utility/Macros.h" #include #include diff --git a/src/sfizz/Region.cpp b/src/sfizz/Region.cpp index e68fa48c..90f4b046 100644 --- a/src/sfizz/Region.cpp +++ b/src/sfizz/Region.cpp @@ -5,12 +5,12 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "Region.h" -#include "MathHelpers.h" -#include "Macros.h" -#include "Debug.h" #include "Opcode.h" -#include "SwapAndPop.h" -#include "StringViewHelpers.h" +#include "MathHelpers.h" +#include "utility/SwapAndPop.h" +#include "utility/StringViewHelpers.h" +#include "utility/Macros.h" +#include "utility/Debug.h" #include "ModifierHelpers.h" #include "modulations/ModId.h" #include "absl/strings/str_replace.h" diff --git a/src/sfizz/Region.h b/src/sfizz/Region.h index aa089908..4b3f106d 100644 --- a/src/sfizz/Region.h +++ b/src/sfizz/Region.h @@ -7,7 +7,6 @@ #pragma once #include "CCMap.h" #include "Curve.h" -#include "LeakDetector.h" #include "Defaults.h" #include "EGDescription.h" #include "FlexEGDescription.h" @@ -19,6 +18,7 @@ #include "MidiState.h" #include "FileId.h" #include "utility/NumericId.h" +#include "utility/LeakDetector.h" #include "modulations/ModKey.h" #include "absl/types/optional.h" #include "absl/strings/string_view.h" diff --git a/src/sfizz/RegionSet.h b/src/sfizz/RegionSet.h index 66b11d2f..6abe17ea 100644 --- a/src/sfizz/RegionSet.h +++ b/src/sfizz/RegionSet.h @@ -9,7 +9,7 @@ #include "Region.h" #include "Voice.h" #include "Opcode.h" -#include "SwapAndPop.h" +#include "utility/SwapAndPop.h" #include namespace sfz diff --git a/src/sfizz/SIMDHelpers.cpp b/src/sfizz/SIMDHelpers.cpp index f34124a4..c7ddf671 100644 --- a/src/sfizz/SIMDHelpers.cpp +++ b/src/sfizz/SIMDHelpers.cpp @@ -6,7 +6,7 @@ #include "SIMDHelpers.h" #include "SIMDConfig.h" -#include "Debug.h" +#include "utility/Debug.h" #include "simd/HelpersSSE.h" #include "simd/HelpersAVX.h" #include "cpuid/cpuinfo.hpp" diff --git a/src/sfizz/SIMDHelpers.h b/src/sfizz/SIMDHelpers.h index fc5e2337..5f71c8cb 100644 --- a/src/sfizz/SIMDHelpers.h +++ b/src/sfizz/SIMDHelpers.h @@ -25,9 +25,9 @@ */ #pragma once #include "Config.h" -#include "Debug.h" #include "Range.h" #include "MathHelpers.h" +#include "utility/Debug.h" #include "simd/HelpersScalar.h" #include #include diff --git a/src/sfizz/SfzFilter.cpp b/src/sfizz/SfzFilter.cpp index 1b24c9e6..03381887 100644 --- a/src/sfizz/SfzFilter.cpp +++ b/src/sfizz/SfzFilter.cpp @@ -7,10 +7,10 @@ #include "Config.h" #include "SfzFilter.h" #include "SfzFilterImpls.hpp" -#include "StringViewHelpers.h" -#include #include "SIMDHelpers.h" -#include "Debug.h" +#include "utility/StringViewHelpers.h" +#include "utility/Debug.h" +#include namespace sfz { diff --git a/src/sfizz/SfzHelpers.h b/src/sfizz/SfzHelpers.h index b5fe5df2..46a7e166 100644 --- a/src/sfizz/SfzHelpers.h +++ b/src/sfizz/SfzHelpers.h @@ -5,17 +5,17 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #pragma once -#include -#include -#include -//#include -#include -#include -#include "Macros.h" #include "Config.h" #include "MathHelpers.h" #include "SIMDHelpers.h" -#include "absl/meta/type_traits.h" +#include "utility/Macros.h" +//#include +#include +#include +#include +#include +#include +#include namespace sfz { diff --git a/src/sfizz/SisterVoiceRing.h b/src/sfizz/SisterVoiceRing.h index edc6e801..fc8c050f 100644 --- a/src/sfizz/SisterVoiceRing.h +++ b/src/sfizz/SisterVoiceRing.h @@ -6,7 +6,7 @@ #pragma once #include "Voice.h" -#include "Debug.h" +#include "utility/Debug.h" #include "absl/meta/type_traits.h" namespace sfz diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index b0f6fc71..0bcdfaf9 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -6,8 +6,8 @@ #include "SynthPrivate.h" #include "Config.h" -#include "Debug.h" -#include "Macros.h" +#include "utility/Debug.h" +#include "utility/Macros.h" #include "modulations/ModId.h" #include "modulations/ModKey.h" #include "modulations/ModMatrix.h" @@ -17,7 +17,7 @@ #include "RegionSet.h" #include "Resources.h" #include "ScopedFTZ.h" -#include "StringViewHelpers.h" +#include "utility/StringViewHelpers.h" #include "utility/XmlHelpers.h" #include "Voice.h" #include "Interpolators.h" diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index a213cf2d..d314b9a0 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -6,10 +6,10 @@ #pragma once #include "AudioSpan.h" -#include "LeakDetector.h" #include "Resources.h" #include "Messaging.h" #include "utility/NumericId.h" +#include "utility/LeakDetector.h" #include "parser/Parser.h" #include #include diff --git a/src/sfizz/SynthMessaging.cpp b/src/sfizz/SynthMessaging.cpp index 3a713858..a91b9447 100644 --- a/src/sfizz/SynthMessaging.cpp +++ b/src/sfizz/SynthMessaging.cpp @@ -5,7 +5,7 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "SynthPrivate.h" -#include "StringViewHelpers.h" +#include "utility/StringViewHelpers.h" #include #include diff --git a/src/sfizz/Tuning.cpp b/src/sfizz/Tuning.cpp index 5130fe4a..886f86fb 100644 --- a/src/sfizz/Tuning.cpp +++ b/src/sfizz/Tuning.cpp @@ -5,9 +5,9 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "Tuning.h" -#include "Debug.h" -#include "absl/types/optional.h" #include "Tunings.h" // Surge tuning library +#include "utility/Debug.h" +#include #include #include #include diff --git a/src/sfizz/Voice.cpp b/src/sfizz/Voice.cpp index 92294130..e2eb1f30 100644 --- a/src/sfizz/Voice.cpp +++ b/src/sfizz/Voice.cpp @@ -13,7 +13,6 @@ #include "FlexEnvelope.h" #include "Interpolators.h" #include "LFO.h" -#include "Macros.h" #include "MathHelpers.h" #include "ModifierHelpers.h" #include "modulations/ModId.h" @@ -25,6 +24,7 @@ #include "SfzHelpers.h" #include "SIMDHelpers.h" #include "Smoothers.h" +#include "utility/Macros.h" #include #include #include diff --git a/src/sfizz/Voice.h b/src/sfizz/Voice.h index eae11f4f..ceaf3588 100644 --- a/src/sfizz/Voice.h +++ b/src/sfizz/Voice.h @@ -10,8 +10,8 @@ #include "Region.h" #include "Resources.h" #include "AudioSpan.h" -#include "LeakDetector.h" #include "utility/NumericId.h" +#include "utility/LeakDetector.h" #include namespace sfz { diff --git a/src/sfizz/Wavetables.h b/src/sfizz/Wavetables.h index a7d90773..451fd7fd 100644 --- a/src/sfizz/Wavetables.h +++ b/src/sfizz/Wavetables.h @@ -6,9 +6,9 @@ #pragma once #include "Config.h" -#include "LeakDetector.h" #include "Buffer.h" #include "MathHelpers.h" +#include "utility/LeakDetector.h" #include #include #include diff --git a/src/sfizz/effects/Apan.cpp b/src/sfizz/effects/Apan.cpp index 92dbb22e..75264787 100644 --- a/src/sfizz/effects/Apan.cpp +++ b/src/sfizz/effects/Apan.cpp @@ -21,9 +21,9 @@ */ #include "Apan.h" -#include "Macros.h" #include "LFOCommon.h" #include "Opcode.h" +#include "utility/Macros.h" #include #include diff --git a/src/sfizz/effects/Eq.cpp b/src/sfizz/effects/Eq.cpp index 25036195..6930ae28 100644 --- a/src/sfizz/effects/Eq.cpp +++ b/src/sfizz/effects/Eq.cpp @@ -21,8 +21,8 @@ #include "Eq.h" #include "Opcode.h" #include "SIMDHelpers.h" -#include "Debug.h" -#include "absl/memory/memory.h" +#include "utility/Debug.h" +#include namespace sfz { namespace fx { diff --git a/src/sfizz/effects/Filter.cpp b/src/sfizz/effects/Filter.cpp index 8b2dff72..20963b40 100644 --- a/src/sfizz/effects/Filter.cpp +++ b/src/sfizz/effects/Filter.cpp @@ -23,8 +23,8 @@ Potential extensions (like ARIA) #include "Filter.h" #include "Opcode.h" #include "SIMDHelpers.h" -#include "Debug.h" -#include "absl/memory/memory.h" +#include "utility/Debug.h" +#include namespace sfz { namespace fx { diff --git a/src/sfizz/modulations/ModKeyHash.cpp b/src/sfizz/modulations/ModKeyHash.cpp index beeb90d3..a8b8ac6f 100644 --- a/src/sfizz/modulations/ModKeyHash.cpp +++ b/src/sfizz/modulations/ModKeyHash.cpp @@ -7,7 +7,7 @@ #include "ModKeyHash.h" #include "ModKey.h" #include "ModId.h" -#include "StringViewHelpers.h" +#include "utility/StringViewHelpers.h" #include size_t std::hash::operator()(const sfz::ModKey &key) const diff --git a/src/sfizz/modulations/ModMatrix.cpp b/src/sfizz/modulations/ModMatrix.cpp index 5899c4be..d5a90678 100644 --- a/src/sfizz/modulations/ModMatrix.cpp +++ b/src/sfizz/modulations/ModMatrix.cpp @@ -11,7 +11,7 @@ #include "Buffer.h" #include "Config.h" #include "SIMDHelpers.h" -#include "Debug.h" +#include "utility/Debug.h" #include #include #include diff --git a/src/sfizz/modulations/sources/ADSREnvelope.cpp b/src/sfizz/modulations/sources/ADSREnvelope.cpp index fb4640e0..1189791b 100644 --- a/src/sfizz/modulations/sources/ADSREnvelope.cpp +++ b/src/sfizz/modulations/sources/ADSREnvelope.cpp @@ -9,9 +9,7 @@ #include "../../Synth.h" #include "../../Voice.h" #include "../../Config.h" -#include "../../Debug.h" - -// TODO(jpc): also matrix the ampeg +#include "../../utility/Debug.h" namespace sfz { diff --git a/src/sfizz/modulations/sources/Controller.cpp b/src/sfizz/modulations/sources/Controller.cpp index c66b74f2..3b2e7470 100644 --- a/src/sfizz/modulations/sources/Controller.cpp +++ b/src/sfizz/modulations/sources/Controller.cpp @@ -10,7 +10,7 @@ #include "../../ModifierHelpers.h" #include "../../Resources.h" #include "../../Config.h" -#include "../../Debug.h" +#include "../../utility/Debug.h" #include namespace sfz { diff --git a/src/sfizz/modulations/sources/FlexEnvelope.cpp b/src/sfizz/modulations/sources/FlexEnvelope.cpp index c9112376..5184bc5e 100644 --- a/src/sfizz/modulations/sources/FlexEnvelope.cpp +++ b/src/sfizz/modulations/sources/FlexEnvelope.cpp @@ -10,7 +10,7 @@ #include "../../Voice.h" #include "../../SIMDHelpers.h" #include "../../Config.h" -#include "../../Debug.h" +#include "../../utility/Debug.h" namespace sfz { diff --git a/src/sfizz/modulations/sources/LFO.cpp b/src/sfizz/modulations/sources/LFO.cpp index aabd5f70..1fd04aee 100644 --- a/src/sfizz/modulations/sources/LFO.cpp +++ b/src/sfizz/modulations/sources/LFO.cpp @@ -10,7 +10,7 @@ #include "../../Voice.h" #include "../../SIMDHelpers.h" #include "../../Config.h" -#include "../../Debug.h" +#include "../../utility/Debug.h" namespace sfz { diff --git a/src/sfizz/sfizz_wrapper.cpp b/src/sfizz/sfizz_wrapper.cpp index 9d1b37e4..ab305734 100644 --- a/src/sfizz/sfizz_wrapper.cpp +++ b/src/sfizz/sfizz_wrapper.cpp @@ -5,9 +5,9 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "Config.h" -#include "Macros.h" #include "Synth.h" #include "Messaging.h" +#include "utility/Macros.h" #include "sfizz.h" #include "sfizz_private.hpp" #include diff --git a/src/sfizz/Debug.h b/src/sfizz/utility/Debug.h similarity index 100% rename from src/sfizz/Debug.h rename to src/sfizz/utility/Debug.h diff --git a/src/sfizz/LeakDetector.h b/src/sfizz/utility/LeakDetector.h similarity index 100% rename from src/sfizz/LeakDetector.h rename to src/sfizz/utility/LeakDetector.h diff --git a/src/sfizz/Macros.h b/src/sfizz/utility/Macros.h similarity index 100% rename from src/sfizz/Macros.h rename to src/sfizz/utility/Macros.h diff --git a/src/sfizz/utility/NumericId.h b/src/sfizz/utility/NumericId.h index 73d0b12f..1705aba1 100644 --- a/src/sfizz/utility/NumericId.h +++ b/src/sfizz/utility/NumericId.h @@ -5,7 +5,7 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #pragma once -#include "../StringViewHelpers.h" +#include "StringViewHelpers.h" #include /** diff --git a/src/sfizz/StringViewHelpers.h b/src/sfizz/utility/StringViewHelpers.h similarity index 100% rename from src/sfizz/StringViewHelpers.h rename to src/sfizz/utility/StringViewHelpers.h diff --git a/src/sfizz/SwapAndPop.h b/src/sfizz/utility/SwapAndPop.h similarity index 100% rename from src/sfizz/SwapAndPop.h rename to src/sfizz/utility/SwapAndPop.h diff --git a/tests/HelpersT.cpp b/tests/HelpersT.cpp index a1e19e43..4198f59e 100644 --- a/tests/HelpersT.cpp +++ b/tests/HelpersT.cpp @@ -4,7 +4,7 @@ // license. You should have receive a LICENSE.md file along with the code. // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz -#include "sfizz/StringViewHelpers.h" +#include "sfizz/utility/StringViewHelpers.h" #include "catch2/catch.hpp" #include "absl/strings/string_view.h" using namespace Catch::literals; diff --git a/tests/SwapAndPopT.cpp b/tests/SwapAndPopT.cpp index dd06d65d..a2b923d5 100644 --- a/tests/SwapAndPopT.cpp +++ b/tests/SwapAndPopT.cpp @@ -5,7 +5,7 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "catch2/catch.hpp" -#include "sfizz/SwapAndPop.h" +#include "sfizz/utility/SwapAndPop.h" using namespace Catch::literals; TEST_CASE("[SwapAndPop] Popping one element")