From d7aaff25d0522bbdaa0ec0e768bdad4588567748 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 25 Aug 2019 06:28:43 -0400 Subject: [PATCH] General: Clean up inclusions Ensures that each header includes all of its dependencies that can't be forward declared. --- include/amuse/AudioGroup.hpp | 9 +++-- include/amuse/AudioGroupData.hpp | 4 ++- include/amuse/AudioGroupPool.hpp | 20 +++++++---- include/amuse/AudioGroupProject.hpp | 10 +++--- include/amuse/AudioGroupSampleDirectory.hpp | 8 +++-- include/amuse/BooBackend.hpp | 20 +++++++---- include/amuse/Common.hpp | 13 ++++--- include/amuse/ContainerRegistry.hpp | 10 +++--- include/amuse/DSPCodec.hpp | 1 - include/amuse/DirectoryEnumerator.hpp | 5 ++- include/amuse/EffectBase.hpp | 3 -- include/amuse/EffectChorus.hpp | 5 +-- include/amuse/EffectDelay.hpp | 7 ++-- include/amuse/EffectReverb.hpp | 6 ++-- include/amuse/Emitter.hpp | 13 +++---- include/amuse/Engine.hpp | 28 ++++++++------- include/amuse/Entity.hpp | 6 ++-- include/amuse/Envelope.hpp | 5 ++- include/amuse/IBackendSubmix.hpp | 4 --- include/amuse/IBackendVoiceAllocator.hpp | 9 +++-- include/amuse/Sequencer.hpp | 16 +++++---- include/amuse/SongConverter.hpp | 2 +- include/amuse/SongState.hpp | 9 +++-- include/amuse/SoundMacroState.hpp | 9 ++--- include/amuse/Studio.hpp | 8 ++--- include/amuse/Submix.hpp | 18 +++++----- include/amuse/Voice.hpp | 35 ++++++++++--------- include/amuse/amuse.hpp | 38 ++++++++++----------- lib/AudioGroup.cpp | 8 +++-- lib/AudioGroupPool.cpp | 15 ++++---- lib/AudioGroupProject.cpp | 10 +++--- lib/AudioGroupSampleDirectory.cpp | 20 ++++++----- lib/BooBackend.cpp | 5 +-- lib/Common.cpp | 8 ++++- lib/ContainerRegistry.cpp | 7 ++-- lib/DSPCodec.cpp | 4 ++- lib/EffectChorus.cpp | 6 ++-- lib/EffectDelay.cpp | 6 ++-- lib/EffectReverb.cpp | 4 ++- lib/Emitter.cpp | 3 +- lib/Engine.cpp | 13 +++---- lib/Envelope.cpp | 2 ++ lib/N64MusyXCodec.cpp | 6 ++-- lib/Sequencer.cpp | 7 ++-- lib/SongConverter.cpp | 8 +++-- lib/SongState.cpp | 4 ++- lib/SoundMacroState.cpp | 11 +++--- lib/Voice.cpp | 20 ++++++----- lib/VolumeTable.cpp | 4 ++- 49 files changed, 286 insertions(+), 206 deletions(-) diff --git a/include/amuse/AudioGroup.hpp b/include/amuse/AudioGroup.hpp index 26581eb..cd0d079 100644 --- a/include/amuse/AudioGroup.hpp +++ b/include/amuse/AudioGroup.hpp @@ -1,10 +1,13 @@ #pragma once -#include "AudioGroupPool.hpp" -#include "AudioGroupProject.hpp" -#include "AudioGroupSampleDirectory.hpp" +#include #include +#include "amuse/AudioGroupPool.hpp" +#include "amuse/AudioGroupProject.hpp" +#include "amuse/AudioGroupSampleDirectory.hpp" +#include "amuse/Common.hpp" + namespace amuse { class AudioGroupData; class ProjectDatabase; diff --git a/include/amuse/AudioGroupData.hpp b/include/amuse/AudioGroupData.hpp index af7a83f..d25da96 100644 --- a/include/amuse/AudioGroupData.hpp +++ b/include/amuse/AudioGroupData.hpp @@ -1,6 +1,8 @@ #pragma once -#include "Common.hpp" +#include + +#include "amuse/Common.hpp" namespace amuse { diff --git a/include/amuse/AudioGroupPool.hpp b/include/amuse/AudioGroupPool.hpp index f8aaa0b..aae27a9 100644 --- a/include/amuse/AudioGroupPool.hpp +++ b/include/amuse/AudioGroupPool.hpp @@ -1,13 +1,19 @@ #pragma once -#include -#include -#include -#include #include -#include "Entity.hpp" -#include "Common.hpp" -#include "athena/MemoryReader.hpp" +#include +#include +#include +#include +#include +#include +#include + +#include "amuse/Common.hpp" +#include "amuse/Entity.hpp" + +#include +#include namespace amuse { class AudioGroupData; diff --git a/include/amuse/AudioGroupProject.hpp b/include/amuse/AudioGroupProject.hpp index 845f3bd..4594c26 100644 --- a/include/amuse/AudioGroupProject.hpp +++ b/include/amuse/AudioGroupProject.hpp @@ -1,11 +1,13 @@ #pragma once -#include "Entity.hpp" -#include "Common.hpp" -#include #include -#include #include +#include +#include + +#include "amuse/Common.hpp" + +#include namespace amuse { class AudioGroupData; diff --git a/include/amuse/AudioGroupSampleDirectory.hpp b/include/amuse/AudioGroupSampleDirectory.hpp index de19771..a849e55 100644 --- a/include/amuse/AudioGroupSampleDirectory.hpp +++ b/include/amuse/AudioGroupSampleDirectory.hpp @@ -1,8 +1,12 @@ #pragma once -#include #include -#include "Common.hpp" +#include +#include + +#include "amuse/Common.hpp" + +#include namespace amuse { class AudioGroupData; diff --git a/include/amuse/BooBackend.hpp b/include/amuse/BooBackend.hpp index 7ff57ed..6ceb3cf 100644 --- a/include/amuse/BooBackend.hpp +++ b/include/amuse/BooBackend.hpp @@ -1,15 +1,21 @@ #pragma once -#include +#include +#include +#include +#include +#include +#include +#include + +#include "amuse/IBackendVoice.hpp" +#include "amuse/IBackendSubmix.hpp" +#include "amuse/IBackendVoiceAllocator.hpp" + #include +#include #include #include -#include "IBackendVoice.hpp" -#include "IBackendSubmix.hpp" -#include "IBackendVoiceAllocator.hpp" -#include -#include -#include namespace amuse { diff --git a/include/amuse/Common.hpp b/include/amuse/Common.hpp index b2d7378..ac5c780 100644 --- a/include/amuse/Common.hpp +++ b/include/amuse/Common.hpp @@ -1,17 +1,16 @@ #pragma once #include -#include -#include +#include #include -#include +#include +#include #include #include -#include -#include #include -#include "athena/DNA.hpp" -#include "logvisor/logvisor.hpp" + +#include +#include #ifndef _WIN32 #include diff --git a/include/amuse/ContainerRegistry.hpp b/include/amuse/ContainerRegistry.hpp index 284255d..95212c4 100644 --- a/include/amuse/ContainerRegistry.hpp +++ b/include/amuse/ContainerRegistry.hpp @@ -1,10 +1,12 @@ #pragma once -#include "AudioGroupData.hpp" -#include "Common.hpp" -#include -#include +#include +#include #include +#include + +#include "amuse/AudioGroupData.hpp" +#include "amuse/Common.hpp" namespace amuse { diff --git a/include/amuse/DSPCodec.hpp b/include/amuse/DSPCodec.hpp index 3f9bf32..b5ac5d4 100644 --- a/include/amuse/DSPCodec.hpp +++ b/include/amuse/DSPCodec.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include constexpr int16_t DSPSampClamp(int32_t val) { if (val < -32768) diff --git a/include/amuse/DirectoryEnumerator.hpp b/include/amuse/DirectoryEnumerator.hpp index a2ccbfc..98c5194 100644 --- a/include/amuse/DirectoryEnumerator.hpp +++ b/include/amuse/DirectoryEnumerator.hpp @@ -1,8 +1,11 @@ #pragma once -#include "Common.hpp" +#include +#include #include +#include "amuse/Common.hpp" + namespace amuse { struct CaseInsensitiveCompare { diff --git a/include/amuse/EffectBase.hpp b/include/amuse/EffectBase.hpp index 0813be9..9d3ee1e 100644 --- a/include/amuse/EffectBase.hpp +++ b/include/amuse/EffectBase.hpp @@ -1,8 +1,5 @@ #pragma once -#include -#include - namespace amuse { struct ChannelMap; diff --git a/include/amuse/EffectChorus.hpp b/include/amuse/EffectChorus.hpp index 7354dd2..906ddb3 100644 --- a/include/amuse/EffectChorus.hpp +++ b/include/amuse/EffectChorus.hpp @@ -1,9 +1,10 @@ #pragma once -#include "EffectBase.hpp" -#include "Common.hpp" #include +#include "amuse/Common.hpp" +#include "amuse/EffectBase.hpp" + namespace amuse { template class EffectChorusImp; diff --git a/include/amuse/EffectDelay.hpp b/include/amuse/EffectDelay.hpp index ca6aa77..278343a 100644 --- a/include/amuse/EffectDelay.hpp +++ b/include/amuse/EffectDelay.hpp @@ -1,11 +1,12 @@ #pragma once -#include "EffectBase.hpp" -#include "IBackendVoice.hpp" -#include "Common.hpp" #include #include +#include "amuse/Common.hpp" +#include "amuse/EffectBase.hpp" +#include "amuse/IBackendVoice.hpp" + namespace amuse { template class EffectDelayImp; diff --git a/include/amuse/EffectReverb.hpp b/include/amuse/EffectReverb.hpp index cd7f16c..b4620a1 100644 --- a/include/amuse/EffectReverb.hpp +++ b/include/amuse/EffectReverb.hpp @@ -1,9 +1,11 @@ #pragma once -#include "EffectBase.hpp" -#include "amuse/Common.hpp" +#include #include +#include "amuse/Common.hpp" +#include "amuse/EffectBase.hpp" + namespace amuse { /** Parameters needed to create EffectReverbStd */ diff --git a/include/amuse/Emitter.hpp b/include/amuse/Emitter.hpp index 2fb8c1f..4c3c00d 100644 --- a/include/amuse/Emitter.hpp +++ b/include/amuse/Emitter.hpp @@ -1,11 +1,11 @@ #pragma once -#include "Entity.hpp" -#include "Common.hpp" -#include "Voice.hpp" -#include -#include #include +#include + +#include "amuse/Common.hpp" +#include "amuse/Entity.hpp" +#include "amuse/Voice.hpp" namespace amuse { class Listener; @@ -32,6 +32,8 @@ inline float Normalize(Vector3f& out) { /** Voice wrapper with positional-3D level control */ class Emitter : public Entity { + friend class Engine; + ObjToken m_vox; Vector3f m_pos = {}; Vector3f m_dir = {}; @@ -43,7 +45,6 @@ class Emitter : public Entity { bool m_dirty = true; Voice::VolumeCache m_attCache; - friend class Engine; void _destroy(); float _attenuationCurve(float dist) const; void _update(); diff --git a/include/amuse/Engine.hpp b/include/amuse/Engine.hpp index 324eb4a..07b35d4 100644 --- a/include/amuse/Engine.hpp +++ b/include/amuse/Engine.hpp @@ -1,25 +1,27 @@ #pragma once -#include +#include +#include #include +#include #include #include -#include -#include "Emitter.hpp" -#include "Listener.hpp" -#include "AudioGroupSampleDirectory.hpp" -#include "Sequencer.hpp" -#include "Studio.hpp" -#include "IBackendVoiceAllocator.hpp" + +#include "amuse/AudioGroupSampleDirectory.hpp" +#include "amuse/Emitter.hpp" +#include "amuse/IBackendVoiceAllocator.hpp" +#include "amuse/Listener.hpp" +#include "amuse/Sequencer.hpp" +#include "amuse/Studio.hpp" namespace amuse { -class IBackendVoiceAllocator; -class Voice; -class Submix; -class Emitter; class AudioGroup; class AudioGroupData; +class Emitter; +class IBackendVoiceAllocator; class IMIDIReader; +class Submix; +class Voice; enum class AmplitudeMode { PerSample, /**< Per-sample amplitude evaluation (dt = 1.0 / sampleRate, rather CPU demanding) */ @@ -28,10 +30,10 @@ enum class AmplitudeMode { /** Main audio playback system for a single audio output */ class Engine { - friend class Voice; friend class Emitter; friend class Sequencer; friend class Studio; + friend class Voice; friend struct Sequencer::ChannelState; IBackendVoiceAllocator& m_backend; diff --git a/include/amuse/Entity.hpp b/include/amuse/Entity.hpp index ffefcdf..78bbd63 100644 --- a/include/amuse/Entity.hpp +++ b/include/amuse/Entity.hpp @@ -1,13 +1,11 @@ #pragma once -#include -#include #include -#include "Common.hpp" +#include "amuse/Common.hpp" namespace amuse { -class Engine; class AudioGroup; +class Engine; /** Common 'engine child' class */ class Entity : public IObj { diff --git a/include/amuse/Envelope.hpp b/include/amuse/Envelope.hpp index e3d2422..51c6362 100644 --- a/include/amuse/Envelope.hpp +++ b/include/amuse/Envelope.hpp @@ -1,10 +1,13 @@ #pragma once -#include "AudioGroupPool.hpp" +#include namespace amuse { class Voice; +struct ADSR; +struct ADSRDLS; + /** Per-sample state tracker for ADSR envelope data */ class Envelope { public: diff --git a/include/amuse/IBackendSubmix.hpp b/include/amuse/IBackendSubmix.hpp index e146658..59c5404 100644 --- a/include/amuse/IBackendSubmix.hpp +++ b/include/amuse/IBackendSubmix.hpp @@ -1,10 +1,6 @@ #pragma once -#include - namespace amuse { -class IBackendVoice; -class Voice; enum class SubmixFormat { Int16, Int32, Float }; diff --git a/include/amuse/IBackendVoiceAllocator.hpp b/include/amuse/IBackendVoiceAllocator.hpp index a3777b1..ae3d07f 100644 --- a/include/amuse/IBackendVoiceAllocator.hpp +++ b/include/amuse/IBackendVoiceAllocator.hpp @@ -1,15 +1,14 @@ #pragma once #include -#include #include namespace amuse { -class IBackendVoice; -class IBackendSubmix; -class Voice; -class Submix; class Engine; +class IBackendSubmix; +class IBackendVoice; +class Submix; +class Voice; /** Same enum as boo for describing speaker-configuration */ enum class AudioChannelSet { Stereo, Quad, Surround51, Surround71, Unknown = 0xff }; diff --git a/include/amuse/Sequencer.hpp b/include/amuse/Sequencer.hpp index 0d8a2e7..f935650 100644 --- a/include/amuse/Sequencer.hpp +++ b/include/amuse/Sequencer.hpp @@ -1,14 +1,16 @@ #pragma once -#include "Entity.hpp" -#include "AudioGroupProject.hpp" -#include "SongState.hpp" -#include "Studio.hpp" -#include "Voice.hpp" +#include +#include #include #include -#include -#include + +#include "amuse/AudioGroupProject.hpp" +#include "amuse/Common.hpp" +#include "amuse/Entity.hpp" +#include "amuse/SongState.hpp" +#include "amuse/Studio.hpp" +#include "amuse/Voice.hpp" namespace amuse { diff --git a/include/amuse/SongConverter.hpp b/include/amuse/SongConverter.hpp index 303ac71..b1b8578 100644 --- a/include/amuse/SongConverter.hpp +++ b/include/amuse/SongConverter.hpp @@ -1,7 +1,7 @@ #pragma once -#include #include +#include namespace amuse { diff --git a/include/amuse/SongState.hpp b/include/amuse/SongState.hpp index 2ff14f2..92ffb3d 100644 --- a/include/amuse/SongState.hpp +++ b/include/amuse/SongState.hpp @@ -1,10 +1,9 @@ #pragma once -#include -#include #include -#include -#include "Entity.hpp" +#include + +#include "amuse/Entity.hpp" namespace amuse { class Sequencer; @@ -13,8 +12,8 @@ enum class SongPlayState { Stopped, Playing }; /** Real-time state of Song execution */ class SongState { - friend class Voice; friend class SongConverter; + friend class Voice; /** Song header */ struct Header { diff --git a/include/amuse/SoundMacroState.hpp b/include/amuse/SoundMacroState.hpp index 1db42d2..1c968c7 100644 --- a/include/amuse/SoundMacroState.hpp +++ b/include/amuse/SoundMacroState.hpp @@ -1,11 +1,12 @@ #pragma once #include +#include #include -#include -#include "Entity.hpp" -#include "Common.hpp" -#include "AudioGroupPool.hpp" + +#include "amuse/AudioGroupPool.hpp" +#include "amuse/Common.hpp" +#include "amuse/Entity.hpp" /* Squelch Win32 macro pollution >.< */ #undef SendMessage diff --git a/include/amuse/Studio.hpp b/include/amuse/Studio.hpp index a7a665f..9f853f7 100644 --- a/include/amuse/Studio.hpp +++ b/include/amuse/Studio.hpp @@ -1,10 +1,10 @@ #pragma once -#include #include -#include "Entity.hpp" -#include "Submix.hpp" -#include + +#include "amuse/Common.hpp" +#include "amuse/Entity.hpp" +#include "amuse/Submix.hpp" namespace amuse { struct StudioSend; diff --git a/include/amuse/Submix.hpp b/include/amuse/Submix.hpp index 191593e..d779b3f 100644 --- a/include/amuse/Submix.hpp +++ b/include/amuse/Submix.hpp @@ -1,14 +1,16 @@ #pragma once +#include #include -#include "SoundMacroState.hpp" -#include "IBackendSubmix.hpp" -#include "IBackendVoice.hpp" -#include "EffectBase.hpp" -#include "EffectChorus.hpp" -#include "EffectDelay.hpp" -#include "EffectReverb.hpp" -#include +#include + +#include "amuse/EffectBase.hpp" +#include "amuse/EffectChorus.hpp" +#include "amuse/EffectDelay.hpp" +#include "amuse/EffectReverb.hpp" +#include "amuse/IBackendSubmix.hpp" +#include "amuse/SoundMacroState.hpp" + namespace amuse { class IBackendSubmix; diff --git a/include/amuse/Voice.hpp b/include/amuse/Voice.hpp index 9dfb210..ebdfb27 100644 --- a/include/amuse/Voice.hpp +++ b/include/amuse/Voice.hpp @@ -2,15 +2,16 @@ #include #include -#include #include +#include #include -#include "SoundMacroState.hpp" -#include "Entity.hpp" -#include "AudioGroupSampleDirectory.hpp" -#include "AudioGroup.hpp" -#include "Envelope.hpp" -#include "Studio.hpp" + +#include "amuse/AudioGroup.hpp" +#include "amuse/AudioGroupSampleDirectory.hpp" +#include "amuse/Entity.hpp" +#include "amuse/Envelope.hpp" +#include "amuse/SoundMacroState.hpp" +#include "amuse/Studio.hpp" namespace amuse { class IBackendVoice; @@ -26,20 +27,20 @@ enum class VoiceState { /** Individual source of audio */ class Voice : public Entity { - friend class Engine; - friend class Sequencer; - friend struct SoundMacroState; - friend class Envelope; friend class Emitter; - friend struct SoundMacro::CmdScaleVolume; - friend struct SoundMacro::CmdKeyOff; - friend struct SoundMacro::CmdScaleVolumeDLS; - friend struct SoundMacro::CmdReturn; + friend class Engine; + friend class Envelope; + friend class Sequencer; + friend struct SoundMacro::CmdGetMessage; friend struct SoundMacro::CmdGoSub; + friend struct SoundMacro::CmdKeyOff; + friend struct SoundMacro::CmdModeSelect; + friend struct SoundMacro::CmdReturn; + friend struct SoundMacro::CmdScaleVolume; + friend struct SoundMacro::CmdScaleVolumeDLS; friend struct SoundMacro::CmdTrapEvent; friend struct SoundMacro::CmdUntrapEvent; - friend struct SoundMacro::CmdGetMessage; - friend struct SoundMacro::CmdModeSelect; + friend struct SoundMacroState; struct VolumeCache { bool m_curDLS = false; /**< Current DLS status of cached lookup */ diff --git a/include/amuse/amuse.hpp b/include/amuse/amuse.hpp index 688ba65..55fca34 100644 --- a/include/amuse/amuse.hpp +++ b/include/amuse/amuse.hpp @@ -1,21 +1,21 @@ #pragma once -#include "AudioGroup.hpp" -#include "AudioGroupData.hpp" -#include "AudioGroupPool.hpp" -#include "AudioGroupProject.hpp" -#include "AudioGroupSampleDirectory.hpp" -#include "ContainerRegistry.hpp" -#include "EffectChorus.hpp" -#include "EffectDelay.hpp" -#include "EffectReverb.hpp" -#include "Emitter.hpp" -#include "Engine.hpp" -#include "Envelope.hpp" -#include "Listener.hpp" -#include "Sequencer.hpp" -#include "SoundMacroState.hpp" -#include "SongConverter.hpp" -#include "SongState.hpp" -#include "Submix.hpp" -#include "Voice.hpp" +#include "amuse/AudioGroup.hpp" +#include "amuse/AudioGroupData.hpp" +#include "amuse/AudioGroupPool.hpp" +#include "amuse/AudioGroupProject.hpp" +#include "amuse/AudioGroupSampleDirectory.hpp" +#include "amuse/ContainerRegistry.hpp" +#include "amuse/EffectChorus.hpp" +#include "amuse/EffectDelay.hpp" +#include "amuse/EffectReverb.hpp" +#include "amuse/Emitter.hpp" +#include "amuse/Engine.hpp" +#include "amuse/Envelope.hpp" +#include "amuse/Listener.hpp" +#include "amuse/Sequencer.hpp" +#include "amuse/SoundMacroState.hpp" +#include "amuse/SongConverter.hpp" +#include "amuse/SongState.hpp" +#include "amuse/Submix.hpp" +#include "amuse/Voice.hpp" diff --git a/lib/AudioGroup.cpp b/lib/AudioGroup.cpp index 7687e92..4d00ee1 100644 --- a/lib/AudioGroup.cpp +++ b/lib/AudioGroup.cpp @@ -1,9 +1,13 @@ #include "amuse/AudioGroup.hpp" -#include "amuse/AudioGroupData.hpp" + #include +#include + +#include "amuse/AudioGroupData.hpp" + #include #include -#include + using namespace std::literals; diff --git a/lib/AudioGroupPool.cpp b/lib/AudioGroupPool.cpp index e03db51..7e5f4dc 100644 --- a/lib/AudioGroupPool.cpp +++ b/lib/AudioGroupPool.cpp @@ -1,12 +1,15 @@ -#include #include "amuse/AudioGroupPool.hpp" + +#include "amuse/AudioGroupData.hpp" #include "amuse/Common.hpp" #include "amuse/Entity.hpp" -#include "amuse/AudioGroupData.hpp" -#include "logvisor/logvisor.hpp" -#include "athena/FileWriter.hpp" -#include "athena/FileReader.hpp" -#include "athena/VectorWriter.hpp" + +#include +#include +#include +#include + +#include using namespace std::literals; diff --git a/lib/AudioGroupProject.cpp b/lib/AudioGroupProject.cpp index 2fe152a..e7a28a2 100644 --- a/lib/AudioGroupProject.cpp +++ b/lib/AudioGroupProject.cpp @@ -1,11 +1,13 @@ -#include #include "amuse/AudioGroupProject.hpp" + #include "amuse/AudioGroupPool.hpp" #include "amuse/AudioGroupSampleDirectory.hpp" #include "amuse/AudioGroupData.hpp" -#include "athena/MemoryReader.hpp" -#include "athena/FileWriter.hpp" -#include "athena/FileReader.hpp" + +#include +#include +#include +#include namespace amuse { diff --git a/lib/AudioGroupSampleDirectory.cpp b/lib/AudioGroupSampleDirectory.cpp index 92b8a5d..1d3685e 100644 --- a/lib/AudioGroupSampleDirectory.cpp +++ b/lib/AudioGroupSampleDirectory.cpp @@ -1,15 +1,19 @@ #include "amuse/AudioGroupSampleDirectory.hpp" -#include "amuse/Common.hpp" + +#include + +#include "amuse/AudioGroup.hpp" #include "amuse/AudioGroupData.hpp" +#include "amuse/Common.hpp" +#include "amuse/DirectoryEnumerator.hpp" #include "amuse/DSPCodec.hpp" #include "amuse/N64MusyXCodec.hpp" -#include "amuse/DirectoryEnumerator.hpp" -#include "amuse/AudioGroup.hpp" -#include "athena/MemoryReader.hpp" -#include "athena/FileWriter.hpp" -#include "athena/FileReader.hpp" -#include "athena/VectorWriter.hpp" -#include + +#include +#include +#include +#include + #ifndef _WIN32 #include #else diff --git a/lib/BooBackend.cpp b/lib/BooBackend.cpp index 295479f..54e5132 100644 --- a/lib/BooBackend.cpp +++ b/lib/BooBackend.cpp @@ -1,7 +1,8 @@ #include "amuse/BooBackend.hpp" -#include "amuse/Voice.hpp" -#include "amuse/Submix.hpp" + #include "amuse/Engine.hpp" +#include "amuse/Submix.hpp" +#include "amuse/Voice.hpp" namespace amuse { diff --git a/lib/Common.cpp b/lib/Common.cpp index 8767165..821a888 100644 --- a/lib/Common.cpp +++ b/lib/Common.cpp @@ -1,5 +1,11 @@ #include "amuse/Common.hpp" -#include "logvisor/logvisor.hpp" + +#ifndef _WIN32 +#include +#include +#endif + +#include using namespace std::literals; diff --git a/lib/ContainerRegistry.cpp b/lib/ContainerRegistry.cpp index ed0e20e..3459b85 100644 --- a/lib/ContainerRegistry.cpp +++ b/lib/ContainerRegistry.cpp @@ -1,11 +1,14 @@ #include "amuse/ContainerRegistry.hpp" -#include "amuse/Common.hpp" + #include #include #include -#include #include +#include #include + +#include "amuse/Common.hpp" + #include #include diff --git a/lib/DSPCodec.cpp b/lib/DSPCodec.cpp index b4968e1..fe543a7 100644 --- a/lib/DSPCodec.cpp +++ b/lib/DSPCodec.cpp @@ -1,7 +1,9 @@ #include "amuse/DSPCodec.hpp" + #include +#include #include -#include +#include #if __SWITCH__ #include "switch_math.hpp" diff --git a/lib/EffectChorus.cpp b/lib/EffectChorus.cpp index 48fe397..c17478a 100644 --- a/lib/EffectChorus.cpp +++ b/lib/EffectChorus.cpp @@ -1,8 +1,10 @@ #include "amuse/EffectChorus.hpp" + +#include +#include + #include "amuse/Common.hpp" #include "amuse/IBackendVoice.hpp" -#include -#include namespace amuse { diff --git a/lib/EffectDelay.cpp b/lib/EffectDelay.cpp index 6f6d923..1ef6fd2 100644 --- a/lib/EffectDelay.cpp +++ b/lib/EffectDelay.cpp @@ -1,8 +1,10 @@ #include "amuse/EffectDelay.hpp" + +#include +#include + #include "amuse/Common.hpp" #include "amuse/IBackendVoice.hpp" -#include -#include namespace amuse { diff --git a/lib/EffectReverb.cpp b/lib/EffectReverb.cpp index 3b23ce0..a71e3db 100644 --- a/lib/EffectReverb.cpp +++ b/lib/EffectReverb.cpp @@ -1,8 +1,10 @@ #include "amuse/EffectReverb.hpp" -#include "amuse/IBackendVoice.hpp" + #include #include +#include "amuse/IBackendVoice.hpp" + namespace amuse { /* clang-format off */ diff --git a/lib/Emitter.cpp b/lib/Emitter.cpp index 41a874a..2dc8ab2 100644 --- a/lib/Emitter.cpp +++ b/lib/Emitter.cpp @@ -1,7 +1,8 @@ #include "amuse/Emitter.hpp" + +#include "amuse/Engine.hpp" #include "amuse/Listener.hpp" #include "amuse/Voice.hpp" -#include "amuse/Engine.hpp" namespace amuse { diff --git a/lib/Engine.cpp b/lib/Engine.cpp index 475a574..424a44e 100644 --- a/lib/Engine.cpp +++ b/lib/Engine.cpp @@ -1,12 +1,13 @@ #include "amuse/Engine.hpp" -#include "amuse/Voice.hpp" -#include "amuse/Submix.hpp" -#include "amuse/Sequencer.hpp" + +#include "amuse/AudioGroup.hpp" +#include "amuse/AudioGroupData.hpp" +#include "amuse/Common.hpp" #include "amuse/IBackendVoice.hpp" #include "amuse/IBackendVoiceAllocator.hpp" -#include "amuse/AudioGroupData.hpp" -#include "amuse/AudioGroup.hpp" -#include "amuse/Common.hpp" +#include "amuse/Sequencer.hpp" +#include "amuse/Submix.hpp" +#include "amuse/Voice.hpp" namespace amuse { diff --git a/lib/Envelope.cpp b/lib/Envelope.cpp index 2a6c187..455c71a 100644 --- a/lib/Envelope.cpp +++ b/lib/Envelope.cpp @@ -1,4 +1,6 @@ #include "amuse/Envelope.hpp" + +#include "amuse/AudioGroupPool.hpp" #include "amuse/Voice.hpp" namespace amuse { diff --git a/lib/N64MusyXCodec.cpp b/lib/N64MusyXCodec.cpp index e805f55..c458dd4 100644 --- a/lib/N64MusyXCodec.cpp +++ b/lib/N64MusyXCodec.cpp @@ -1,7 +1,7 @@ #include "amuse/N64MusyXCodec.hpp" -#include -#include -#include + +#include +#include /* Acknowledgements: * SubDrag for N64 Sound Tool (http://www.goldeneyevault.com/viewfile.php?id=212) diff --git a/lib/Sequencer.cpp b/lib/Sequencer.cpp index d124b91..a9ce985 100644 --- a/lib/Sequencer.cpp +++ b/lib/Sequencer.cpp @@ -1,9 +1,10 @@ #include "amuse/Sequencer.hpp" -#include "amuse/Submix.hpp" -#include "amuse/Voice.hpp" -#include "amuse/Engine.hpp" + #include +#include "amuse/Engine.hpp" +#include "amuse/Voice.hpp" + namespace amuse { void Sequencer::ChannelState::_bringOutYourDead() { diff --git a/lib/SongConverter.cpp b/lib/SongConverter.cpp index 3f5b728..f5178c6 100644 --- a/lib/SongConverter.cpp +++ b/lib/SongConverter.cpp @@ -1,9 +1,13 @@ #include "amuse/SongConverter.hpp" -#include "amuse/SongState.hpp" -#include "amuse/Common.hpp" + +#include +#include #include #include +#include "amuse/Common.hpp" +#include "amuse/SongState.hpp" + namespace amuse { constexpr uint8_t clamp7(uint8_t val) { return std::max(0, std::min(127, int(val))); } diff --git a/lib/SongState.cpp b/lib/SongState.cpp index 9e312c1..3936a2f 100644 --- a/lib/SongState.cpp +++ b/lib/SongState.cpp @@ -1,7 +1,9 @@ #include "amuse/SongState.hpp" + +#include + #include "amuse/Common.hpp" #include "amuse/Sequencer.hpp" -#include namespace amuse { diff --git a/lib/SoundMacroState.cpp b/lib/SoundMacroState.cpp index 4faf32f..ba29b0d 100644 --- a/lib/SoundMacroState.cpp +++ b/lib/SoundMacroState.cpp @@ -1,10 +1,13 @@ #include "amuse/SoundMacroState.hpp" -#include "amuse/Voice.hpp" -#include "amuse/Engine.hpp" -#include "amuse/Common.hpp" + +#include +#include + #include "amuse/AudioGroup.hpp" #include "amuse/AudioGroupPool.hpp" -#include +#include "amuse/Common.hpp" +#include "amuse/Engine.hpp" +#include "amuse/Voice.hpp" using namespace std::literals; diff --git a/lib/Voice.cpp b/lib/Voice.cpp index 900db8d..de636fa 100644 --- a/lib/Voice.cpp +++ b/lib/Voice.cpp @@ -1,16 +1,18 @@ #include "amuse/Voice.hpp" -#include "amuse/Submix.hpp" -#include "amuse/IBackendVoice.hpp" -#include "amuse/IBackendVoiceAllocator.hpp" -#include "amuse/AudioGroup.hpp" -#include "amuse/Common.hpp" -#include "amuse/Engine.hpp" -#include "amuse/DSPCodec.hpp" -#include "amuse/N64MusyXCodec.hpp" -#include "amuse/VolumeTable.hpp" + #include #include +#include "amuse/AudioGroup.hpp" +#include "amuse/Common.hpp" +#include "amuse/DSPCodec.hpp" +#include "amuse/Engine.hpp" +#include "amuse/IBackendVoice.hpp" +#include "amuse/IBackendVoiceAllocator.hpp" +#include "amuse/N64MusyXCodec.hpp" +#include "amuse/Submix.hpp" +#include "amuse/VolumeTable.hpp" + namespace amuse { float Voice::VolumeCache::getVolume(float vol, bool dls) { diff --git a/lib/VolumeTable.cpp b/lib/VolumeTable.cpp index 926633b..1c94508 100644 --- a/lib/VolumeTable.cpp +++ b/lib/VolumeTable.cpp @@ -1,7 +1,9 @@ #include "amuse/VolumeTable.hpp" -#include "amuse/Common.hpp" + #include +#include "amuse/Common.hpp" + namespace amuse { static const float VolumeTable[] = {