Skip to content

Commit

Permalink
Clean up some includes
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Feb 9, 2024
1 parent 7f282a9 commit e11ea97
Show file tree
Hide file tree
Showing 19 changed files with 121 additions and 84 deletions.
22 changes: 20 additions & 2 deletions al/auxeffectslot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,51 @@

#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iterator>
#include <memory>
#include <mutex>
#include <numeric>
#include <thread>
#include <stdexcept>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>

#include "AL/al.h"
#include "AL/alc.h"
#include "AL/alext.h"
#include "AL/efx.h"

#include "albit.h"
#include "alc/alu.h"
#include "alc/context.h"
#include "alc/device.h"
#include "alc/effects/base.h"
#include "alc/inprogext.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "alspan.h"
#include "atomic.h"
#include "buffer.h"
#include "core/except.h"
#include "core/buffer_storage.h"
#include "core/device.h"
#include "core/fpu_ctrl.h"
#include "core/logging.h"
#include "direct_defs.h"
#include "effect.h"
#include "flexarray.h"
#include "opthelpers.h"

#ifdef ALSOFT_EAX
#include "eax/api.h"
#include "eax/call.h"
#include "eax/effect.h"
#include "eax/fx_slot_index.h"
#include "eax/utils.h"
#endif

namespace {

using SubListAllocator = al::allocator<std::array<ALeffectslot,64>>;
Expand Down
12 changes: 4 additions & 8 deletions al/auxeffectslot.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
#ifndef AL_AUXEFFECTSLOT_H
#define AL_AUXEFFECTSLOT_H

#include <array>
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <string_view>
#include <utility>

#include "AL/al.h"
#include "AL/alc.h"
#include "AL/efx.h"

#include "alc/device.h"
#include "alc/effects/base.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "atomic.h"
#include "core/effects/base.h"
#include "core/effectslot.h"
#include "intrusive_ptr.h"
#include "vector.h"

#ifdef ALSOFT_EAX
#include <memory>
#include "eax/api.h"
#include "eax/call.h"
#include "eax/effect.h"
#include "eax/exception.h"
Expand All @@ -29,8 +27,6 @@
#endif // ALSOFT_EAX

struct ALbuffer;
struct ALeffect;
struct WetBuffer;

#ifdef ALSOFT_EAX
class EaxFxSlotException : public EaxException {
Expand Down
10 changes: 6 additions & 4 deletions al/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iterator>
#include <limits>
#include <memory>
#include <mutex>
#include <new>
#include <numeric>
#include <optional>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>

Expand All @@ -51,11 +51,13 @@
#include "alc/inprogext.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "atomic.h"
#include "core/except.h"
#include "alspan.h"
#include "core/device.h"
#include "core/logging.h"
#include "core/resampler_limits.h"
#include "core/voice.h"
#include "direct_defs.h"
#include "intrusive_ptr.h"
#include "opthelpers.h"

#ifdef ALSOFT_EAX
Expand Down
6 changes: 3 additions & 3 deletions al/buffer.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#ifndef AL_BUFFER_H
#define AL_BUFFER_H

#include <array>
#include <atomic>
#include <cstddef>
#include <cstdint>
#include <string_view>
#include <utility>

#include "AL/al.h"
#include "AL/alc.h"

#include "alc/inprogext.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "atomic.h"
#include "core/buffer_storage.h"
#include "vector.h"

#ifdef ALSOFT_EAX
#include "eax/x_ram.h"

enum class EaxStorage : uint8_t {
Automatic,
Accessible,
Expand Down
11 changes: 10 additions & 1 deletion al/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,35 @@

#include <algorithm>
#include <array>
#include <cstddef>
#include <atomic>
#include <cstring>
#include <deque>
#include <mutex>
#include <optional>
#include <stdexcept>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>

#include "AL/al.h"
#include "AL/alc.h"
#include "AL/alext.h"

#include "alc/context.h"
#include "alc/device.h"
#include "alc/inprogext.h"
#include "alnumeric.h"
#include "alspan.h"
#include "alstring.h"
#include "auxeffectslot.h"
#include "buffer.h"
#include "core/logging.h"
#include "core/voice.h"
#include "direct_defs.h"
#include "effect.h"
#include "filter.h"
#include "intrusive_ptr.h"
#include "opthelpers.h"
#include "source.h"

Expand Down
19 changes: 10 additions & 9 deletions al/debug.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#ifndef AL_DEBUG_H
#define AL_DEBUG_H

#include <stdint.h>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>

using uint = unsigned int;
Expand All @@ -11,14 +12,14 @@ using uint = unsigned int;
/* Somewhat arbitrary. Avoid letting it get out of control if the app enables
* logging but never reads it.
*/
inline constexpr uint8_t MaxDebugLoggedMessages{64};
inline constexpr uint16_t MaxDebugMessageLength{1024};
inline constexpr uint8_t MaxDebugGroupDepth{64};
inline constexpr uint16_t MaxObjectLabelLength{1024};
inline constexpr std::uint8_t MaxDebugLoggedMessages{64};
inline constexpr std::uint16_t MaxDebugMessageLength{1024};
inline constexpr std::uint8_t MaxDebugGroupDepth{64};
inline constexpr std::uint16_t MaxObjectLabelLength{1024};


inline constexpr uint DebugSourceBase{0};
enum class DebugSource : uint8_t {
enum class DebugSource : std::uint8_t {
API = 0,
System,
ThirdParty,
Expand All @@ -28,7 +29,7 @@ enum class DebugSource : uint8_t {
inline constexpr uint DebugSourceCount{5};

inline constexpr uint DebugTypeBase{DebugSourceBase + DebugSourceCount};
enum class DebugType : uint8_t {
enum class DebugType : std::uint8_t {
Error = 0,
DeprecatedBehavior,
UndefinedBehavior,
Expand All @@ -42,7 +43,7 @@ enum class DebugType : uint8_t {
inline constexpr uint DebugTypeCount{9};

inline constexpr uint DebugSeverityBase{DebugTypeBase + DebugTypeCount};
enum class DebugSeverity : uint8_t {
enum class DebugSeverity : std::uint8_t {
High = 0,
Medium,
Low,
Expand All @@ -55,7 +56,7 @@ struct DebugGroup {
const DebugSource mSource;
std::string mMessage;
std::vector<uint> mFilters;
std::vector<uint64_t> mIdFilters;
std::vector<std::uint64_t> mIdFilters;

template<typename T>
DebugGroup(DebugSource source, uint id, T&& message)
Expand Down
1 change: 1 addition & 0 deletions al/eax/effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "alnumeric.h"
#include "AL/al.h"
#include "AL/alext.h"
#include "core/effects/base.h"
#include "call.h"

Expand Down
16 changes: 8 additions & 8 deletions al/effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@
#include "effect.h"

#include <algorithm>
#include <cstdarg>
#include <cstdint>
#include <cstring>
#include <iterator>
#include <memory>
#include <mutex>
#include <new>
#include <numeric>
#include <string>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <variant>
#include <vector>

#include "AL/al.h"
Expand All @@ -39,24 +43,20 @@
#include "AL/efx-presets.h"
#include "AL/efx.h"

#include "al/effects/effects.h"
#include "albit.h"
#include "alc/context.h"
#include "alc/device.h"
#include "alc/effects/base.h"
#include "alc/inprogext.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "alspan.h"
#include "alstring.h"
#include "core/except.h"
#include "core/logging.h"
#include "direct_defs.h"
#include "intrusive_ptr.h"
#include "opthelpers.h"

#ifdef ALSOFT_EAX
#include <cassert>

#include "eax/exception.h"
#endif // ALSOFT_EAX

const std::array<EffectList,16> gEffectList{{
{ "eaxreverb", EAXREVERB_EFFECT, AL_EFFECT_EAXREVERB },
Expand Down
5 changes: 3 additions & 2 deletions al/effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
#include <bitset>
#include <cstdint>
#include <string_view>
#include <utility>

#include "AL/al.h"
#include "AL/alc.h"
#include "AL/efx.h"

#include "al/effects/effects.h"
#include "alc/effects/base.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "core/effects/base.h"


enum {
Expand Down
11 changes: 5 additions & 6 deletions al/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
#include <cstdlib>
#include <cstring>
#include <limits>
#include <mutex>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "AL/al.h"
Expand All @@ -41,11 +43,8 @@
#include "al/debug.h"
#include "alc/alconfig.h"
#include "alc/context.h"
#include "almalloc.h"
#include "alstring.h"
#include "core/except.h"
#include "alc/inprogext.h"
#include "core/logging.h"
#include "direct_defs.h"
#include "opthelpers.h"
#include "strutils.h"

Expand All @@ -57,7 +56,7 @@ void ALCcontext::setError(ALenum errorCode, const char *msg, ...)
auto message = std::vector<char>(256);

/* NOLINTBEGIN(*-array-to-pointer-decay) */
va_list args, args2;
std::va_list args, args2;
va_start(args, msg);
va_copy(args2, args);
int msglen{std::vsnprintf(message.data(), message.size(), msg, args)};
Expand Down
16 changes: 10 additions & 6 deletions al/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

#include "event.h"

#include <algorithm>
#include <array>
#include <atomic>
#include <cstring>
#include <bitset>
#include <exception>
#include <memory>
#include <mutex>
Expand All @@ -14,21 +14,25 @@
#include <string>
#include <string_view>
#include <thread>
#include <tuple>
#include <utility>
#include <variant>

#include "AL/al.h"
#include "AL/alc.h"
#include "AL/alext.h"

#include "alc/context.h"
#include "alc/effects/base.h"
#include "alc/inprogext.h"
#include "almalloc.h"
#include "alsem.h"
#include "alspan.h"
#include "core/async_event.h"
#include "core/except.h"
#include "core/context.h"
#include "core/effects/base.h"
#include "core/logging.h"
#include "core/voice_change.h"
#include "debug.h"
#include "direct_defs.h"
#include "intrusive_ptr.h"
#include "opthelpers.h"
#include "ringbuffer.h"

Expand Down

0 comments on commit e11ea97

Please sign in to comment.