aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-24 15:52:53 -0700
committerChris Robinson <[email protected]>2021-04-24 15:52:53 -0700
commit9b65ca4556611c0b5b582a57d0c7714614badcc0 (patch)
tree8c57cc375b944ed7e9c1c9f7f9da7fff2f1d2fb8 /alc
parent440ce71dcedb39e827660d0925b6cc2046c6d0f0 (diff)
More include cleanup
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp2
-rw-r--r--alc/alu.h7
-rw-r--r--alc/effects/base.h3
-rw-r--r--alc/voice.cpp7
4 files changed, 10 insertions, 9 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index bd637f8a..1d96cef0 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -1128,7 +1128,7 @@ void alc_initconfig(void)
AllowRTTimeLimit = *limopt;
aluInit();
- aluInitMixer();
+ aluInitMixer(ConfigValueStr(nullptr, nullptr, "resampler"));
auto traperr = al::getenv("ALSOFT_TRAP_ERROR");
if(traperr && (al::strcasecmp(traperr->c_str(), "true") == 0
diff --git a/alc/alu.h b/alc/alu.h
index 2aa1a652..b75c040e 100644
--- a/alc/alu.h
+++ b/alc/alu.h
@@ -4,8 +4,10 @@
#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"
@@ -32,9 +34,6 @@ constexpr float GainMixMax{1000.0f}; /* +60dB */
constexpr float SpeedOfSoundMetersPerSec{343.3f};
constexpr float AirAbsorbGainHF{0.99426f}; /* -0.05dB */
-/** Target gain for the reverb decay feedback reaching the decay time. */
-constexpr float ReverbDecayGain{0.001f}; /* -60 dB */
-
enum HrtfRequestMode {
Hrtf_Default = 0,
@@ -44,7 +43,7 @@ enum HrtfRequestMode {
void aluInit(void);
-void aluInitMixer(void);
+void aluInitMixer(al::optional<std::string> resampler);
/* aluInitRenderer
*
diff --git a/alc/effects/base.h b/alc/effects/base.h
index 64621888..09c722f5 100644
--- a/alc/effects/base.h
+++ b/alc/effects/base.h
@@ -15,6 +15,9 @@ struct EffectSlot;
struct BufferStorage;
+/** Target gain for the reverb decay feedback reaching the decay time. */
+constexpr float ReverbDecayGain{0.001f}; /* -60 dB */
+
enum class ChorusWaveform {
Sinusoid,
Triangle
diff --git a/alc/voice.cpp b/alc/voice.cpp
index 79c47588..6368d5c4 100644
--- a/alc/voice.cpp
+++ b/alc/voice.cpp
@@ -36,7 +36,6 @@
#include <vector>
#include "albyte.h"
-#include "alconfig.h"
#include "alcontext.h"
#include "alnumeric.h"
#include "aloptional.h"
@@ -131,9 +130,9 @@ inline HrtfMixerBlendFunc SelectHrtfBlendMixer()
} // namespace
-void aluInitMixer()
+void aluInitMixer(al::optional<std::string> resampler)
{
- if(auto resopt = ConfigValueStr(nullptr, nullptr, "resampler"))
+ if(resampler)
{
struct ResamplerEntry {
const char name[16];
@@ -150,7 +149,7 @@ void aluInitMixer()
{ "fast_bsinc24", Resampler::FastBSinc24 },
};
- const char *str{resopt->c_str()};
+ const char *str{resampler->c_str()};
if(al::strcasecmp(str, "bsinc") == 0)
{
WARN("Resampler option \"%s\" is deprecated, using bsinc12\n", str);