Skip to content

Commit

Permalink
Move some function definitions to a more appropriate source
Browse files Browse the repository at this point in the history
And fix up some headers
  • Loading branch information
kcat committed Mar 12, 2024
1 parent 95d07ac commit 7c3f3da
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 21 deletions.
12 changes: 0 additions & 12 deletions al/effect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "effect.h"

#include <algorithm>
#include <cstdarg>
#include <cstdint>
#include <cstring>
#include <iterator>
Expand Down Expand Up @@ -78,17 +77,6 @@ const std::array<EffectList,16> gEffectList{{
}};


effect_exception::effect_exception(ALenum code, const char *msg, ...) : mErrorCode{code}
{
/* NOLINTBEGIN(*-array-to-pointer-decay) */
std::va_list args;
va_start(args, msg);
setMessage(msg, args);
va_end(args);
/* NOLINTEND(*-array-to-pointer-decay) */
}
effect_exception::~effect_exception() = default;

namespace {

using SubListAllocator = al::allocator<std::array<ALeffect,64>>;
Expand Down
1 change: 1 addition & 0 deletions al/effects/autowah.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#ifdef ALSOFT_EAX
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/chorus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#ifdef ALSOFT_EAX
#include <cassert>
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/compressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#ifdef ALSOFT_EAX
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/distortion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#ifdef ALSOFT_EAX
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/echo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#ifdef ALSOFT_EAX
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
18 changes: 13 additions & 5 deletions al/effects/effects.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#include "config.h"

#ifdef ALSOFT_EAX

#include <cassert>
#include "AL/efx.h"
#include "effects.h"

#endif // ALSOFT_EAX
#include <cstdarg>


effect_exception::effect_exception(ALenum code, const char *msg, ...) : mErrorCode{code}
{
/* NOLINTBEGIN(*-array-to-pointer-decay) */
std::va_list args;
va_start(args, msg);
setMessage(msg, args);
va_end(args);
/* NOLINTEND(*-array-to-pointer-decay) */
}
effect_exception::~effect_exception() = default;
6 changes: 2 additions & 4 deletions al/effects/effects.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#ifndef AL_EFFECTS_EFFECTS_H
#define AL_EFFECTS_EFFECTS_H

#include <variant>

#include "AL/al.h"

#include "core/effects/base.h"
#include "core/except.h"

#ifdef ALSOFT_EAX
#include "al/eax/effect.h"
#endif // ALSOFT_EAX


struct EffectHandler {
#define DECL_HANDLER(T) \
Expand Down
1 change: 1 addition & 0 deletions al/effects/equalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#ifdef ALSOFT_EAX
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/fshifter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#ifdef ALSOFT_EAX
#include <cassert>
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/modulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#ifdef ALSOFT_EAX
#include <cassert>
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/null.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "effects.h"

#ifdef ALSOFT_EAX
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#endif // ALSOFT_EAX

Expand Down
1 change: 1 addition & 0 deletions al/effects/pshifter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#ifdef ALSOFT_EAX
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down
1 change: 1 addition & 0 deletions al/effects/vmorpher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#ifdef ALSOFT_EAX
#include <cassert>
#include "alnumeric.h"
#include "al/eax/effect.h"
#include "al/eax/exception.h"
#include "al/eax/utils.h"
#endif // ALSOFT_EAX
Expand Down

0 comments on commit 7c3f3da

Please sign in to comment.