aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-26 07:56:00 -0700
committerChris Robinson <[email protected]>2021-04-26 08:04:50 -0700
commit22a8ebff8094785ec53aadef8489dc60f6939d55 (patch)
treed5297c7fa444e1ac3e2980a2d49cae50f041ddc3 /alc
parent2479483645bf719233fa5d39bc91682f12d71350 (diff)
Move GetChannelIdxByName and clean up some more includes
Diffstat (limited to 'alc')
-rw-r--r--alc/alcmain.h15
-rw-r--r--alc/alcontext.h1
-rw-r--r--alc/alu.cpp22
-rw-r--r--alc/alu.h9
-rw-r--r--alc/backends/base.cpp11
-rw-r--r--alc/backends/base.h5
-rw-r--r--alc/backends/pulseaudio.cpp36
-rw-r--r--alc/effects/convolution.cpp1
-rw-r--r--alc/effects/dedicated.cpp1
9 files changed, 47 insertions, 54 deletions
diff --git a/alc/alcmain.h b/alc/alcmain.h
index e8875184..eb25b596 100644
--- a/alc/alcmain.h
+++ b/alc/alcmain.h
@@ -124,19 +124,4 @@ struct ALCdevice : public al::intrusive_ref<ALCdevice>, DeviceBase {
DEF_NEWDEL(ALCdevice)
};
-/* Must be less than 15 characters (16 including terminating null) for
- * compatibility with pthread_setname_np limitations. */
-#define MIXER_THREAD_NAME "alsoft-mixer"
-
-#define RECORD_THREAD_NAME "alsoft-record"
-
-
-/**
- * Returns the index for the given channel name (e.g. FrontCenter), or
- * INVALID_CHANNEL_INDEX if it doesn't exist.
- */
-inline uint GetChannelIdxByName(const RealMixParams &real, Channel chan) noexcept
-{ return real.ChannelIndex[chan]; }
-#define INVALID_CHANNEL_INDEX ~0u
-
#endif
diff --git a/alc/alcontext.h b/alc/alcontext.h
index 3c368a64..b1b41e76 100644
--- a/alc/alcontext.h
+++ b/alc/alcontext.h
@@ -18,6 +18,7 @@
#include "alnumeric.h"
#include "alu.h"
#include "atomic.h"
+#include "core/bufferline.h"
#include "inprogext.h"
#include "intrusive_ptr.h"
#include "threads.h"
diff --git a/alc/alu.cpp b/alc/alu.cpp
index 14ffd8b5..168f0112 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -28,7 +28,6 @@
#include <cassert>
#include <chrono>
#include <climits>
-#include <cmath>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
@@ -37,46 +36,46 @@
#include <limits>
#include <memory>
#include <new>
-#include <numeric>
+#include <stdint.h>
#include <utility>
-#include "AL/al.h"
-#include "AL/alc.h"
-#include "AL/efx.h"
-
-#include "alcmain.h"
#include "alcontext.h"
#include "almalloc.h"
#include "alnumeric.h"
#include "alspan.h"
#include "alstring.h"
#include "atomic.h"
+#include "buffer_storage.h"
#include "core/ambidefs.h"
#include "core/async_event.h"
#include "core/bformatdec.h"
#include "core/bs2b.h"
+#include "core/bsinc_defs.h"
#include "core/bsinc_tables.h"
+#include "core/bufferline.h"
#include "core/cpu_caps.h"
#include "core/devformat.h"
+#include "core/device.h"
#include "core/filters/biquad.h"
#include "core/filters/nfc.h"
-#include "core/filters/splitter.h"
#include "core/fpu_ctrl.h"
-#include "core/front_stablizer.h"
#include "core/hrtf.h"
#include "core/mastering.h"
#include "core/mixer.h"
#include "core/mixer/defs.h"
+#include "core/mixer/hrtfdefs.h"
+#include "core/resampler_limits.h"
#include "core/uhjfilter.h"
#include "effects/base.h"
#include "effectslot.h"
-#include "inprogext.h"
+#include "intrusive_ptr.h"
#include "math_defs.h"
#include "opthelpers.h"
#include "ringbuffer.h"
#include "strutils.h"
#include "threads.h"
#include "vecmat.h"
+#include "vector.h"
#include "voice.h"
#include "voice_change.h"
@@ -93,7 +92,6 @@ struct SSE4Tag;
#ifdef HAVE_NEON
struct NEONTag;
#endif
-struct CopyTag;
struct PointTag;
struct LerpTag;
struct CubicTag;
@@ -106,6 +104,8 @@ static_assert(!(MaxResamplerPadding&1), "MaxResamplerPadding is not a multiple o
namespace {
+using uint = unsigned int;
+
constexpr uint MaxPitch{10};
static_assert((BufferLineSize-1)/MaxPitch > 0, "MaxPitch is too large for BufferLineSize!");
diff --git a/alc/alu.h b/alc/alu.h
index ac33de27..3ca0c6b6 100644
--- a/alc/alu.h
+++ b/alc/alu.h
@@ -1,22 +1,13 @@
#ifndef ALU_H
#define ALU_H
-#include <array>
-#include <cmath>
-#include <cstddef>
#include <string>
-#include <type_traits>
#include "aloptional.h"
-#include "alspan.h"
-#include "core/ambidefs.h"
-#include "core/bufferline.h"
-#include "core/devformat.h"
struct ALCcontext;
struct ALCdevice;
struct EffectSlot;
-struct MixParams;
#define MAX_SENDS 6
diff --git a/alc/backends/base.cpp b/alc/backends/base.cpp
index c4a4abeb..0c28d238 100644
--- a/alc/backends/base.cpp
+++ b/alc/backends/base.cpp
@@ -3,21 +3,22 @@
#include "base.h"
+#include <algorithm>
+#include <array>
#include <atomic>
-#include <thread>
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mmreg.h>
-#endif
#include "albit.h"
-#include "alcmain.h"
-#include "alnumeric.h"
+#include "core/logging.h"
#include "aloptional.h"
+#endif
+
#include "atomic.h"
-#include "core/logging.h"
+#include "core/devformat.h"
bool BackendBase::reset()
diff --git a/alc/backends/base.h b/alc/backends/base.h
index 853df893..d661bc46 100644
--- a/alc/backends/base.h
+++ b/alc/backends/base.h
@@ -2,12 +2,13 @@
#define ALC_BACKENDS_BASE_H
#include <chrono>
+#include <cstdarg>
#include <memory>
-#include <mutex>
+#include <ratio>
#include <string>
#include "albyte.h"
-#include "alcmain.h"
+#include "core/device.h"
#include "core/except.h"
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index 39eed771..da1ffcb0 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -23,31 +23,47 @@
#include "backends/pulseaudio.h"
-#include <poll.h>
-#include <cstring>
-
+#include <algorithm>
#include <array>
-#include <string>
-#include <vector>
#include <atomic>
-#include <thread>
-#include <algorithm>
-#include <functional>
+#include <bitset>
+#include <chrono>
#include <condition_variable>
+#include <cstring>
+#include <functional>
+#include <limits>
+#include <mutex>
+#include <new>
+#include <poll.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string>
+#include <sys/types.h>
+#include <thread>
+#include <utility>
-#include "alcmain.h"
-#include "alu.h"
+#include "albyte.h"
#include "alconfig.h"
+#include "almalloc.h"
+#include "alnumeric.h"
+#include "aloptional.h"
+#include "alspan.h"
+#include "core/devformat.h"
+#include "core/device.h"
#include "core/helpers.h"
#include "core/logging.h"
#include "dynload.h"
+#include "opthelpers.h"
#include "strutils.h"
+#include "vector.h"
#include <pulse/pulseaudio.h>
namespace {
+using uint = unsigned int;
+
#ifdef HAVE_DYNLOAD
#define PULSE_FUNCS(MAGIC) \
MAGIC(pa_mainloop_new); \
diff --git a/alc/effects/convolution.cpp b/alc/effects/convolution.cpp
index efc1c4c7..90907a40 100644
--- a/alc/effects/convolution.cpp
+++ b/alc/effects/convolution.cpp
@@ -18,7 +18,6 @@
#endif
#include "albyte.h"
-#include "alcmain.h"
#include "alcomplex.h"
#include "alcontext.h"
#include "almalloc.h"
diff --git a/alc/effects/dedicated.cpp b/alc/effects/dedicated.cpp
index 78663053..6afd7baa 100644
--- a/alc/effects/dedicated.cpp
+++ b/alc/effects/dedicated.cpp
@@ -25,7 +25,6 @@
#include <cstdlib>
#include <iterator>
-#include "alcmain.h"
#include "almalloc.h"
#include "alspan.h"
#include "core/bufferline.h"