aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends')
-rw-r--r--alc/backends/base.h2
-rw-r--r--alc/backends/jack.cpp6
-rw-r--r--alc/backends/opensl.cpp2
-rw-r--r--alc/backends/pipewire.cpp6
4 files changed, 8 insertions, 8 deletions
diff --git a/alc/backends/base.h b/alc/backends/base.h
index 70f96275..ecca6b2e 100644
--- a/alc/backends/base.h
+++ b/alc/backends/base.h
@@ -99,7 +99,7 @@ public:
backend_exception(backend_error code, const char *msg, ...);
~backend_exception() override;
- backend_error errorCode() const noexcept { return mErrorCode; }
+ [[nodiscard]] auto errorCode() const noexcept -> backend_error { return mErrorCode; }
};
} // namespace al
diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp
index 4999a738..ca862276 100644
--- a/alc/backends/jack.cpp
+++ b/alc/backends/jack.cpp
@@ -307,7 +307,7 @@ struct JackPlayback final : public BackendBase {
std::string mPortPattern;
jack_client_t *mClient{nullptr};
- std::array<jack_port_t*,MAX_OUTPUT_CHANNELS> mPort{};
+ std::array<jack_port_t*,MaxOutputChannels> mPort{};
std::mutex mMutex;
@@ -339,7 +339,7 @@ JackPlayback::~JackPlayback()
int JackPlayback::processRt(jack_nframes_t numframes) noexcept
{
- std::array<jack_default_audio_sample_t*,MAX_OUTPUT_CHANNELS> out;
+ std::array<jack_default_audio_sample_t*,MaxOutputChannels> out;
size_t numchans{0};
for(auto port : mPort)
{
@@ -363,7 +363,7 @@ int JackPlayback::processRt(jack_nframes_t numframes) noexcept
int JackPlayback::process(jack_nframes_t numframes) noexcept
{
- std::array<jack_default_audio_sample_t*,MAX_OUTPUT_CHANNELS> out;
+ std::array<jack_default_audio_sample_t*,MaxOutputChannels> out;
size_t numchans{0};
for(auto port : mPort)
{
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 32745edd..f49b2ef8 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -439,7 +439,7 @@ bool OpenSLPlayback::reset()
JCALL(env,ReleaseStringUTFChars)(srateStr, strchars);
if(!sampleRate) sampleRate = device->Frequency;
- else sampleRate = maxu(sampleRate, MIN_OUTPUT_RATE);
+ else sampleRate = maxu(sampleRate, MinOutputRate);
}
#endif
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index 96b6623f..ca7e3cf3 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -831,7 +831,7 @@ void DeviceNode::parseSampleRate(const spa_pod *value, bool force_update) noexce
/* [0] is the default, [1] is the min, and [2] is the max. */
TRACE(" sample rate: %d (range: %d -> %d)\n", srates[0], srates[1], srates[2]);
if(!mSampleRate || force_update)
- mSampleRate = static_cast<uint>(clampi(srates[0], MIN_OUTPUT_RATE, MAX_OUTPUT_RATE));
+ mSampleRate = static_cast<uint>(clampi(srates[0], MinOutputRate, MaxOutputRate));
return;
}
@@ -857,7 +857,7 @@ void DeviceNode::parseSampleRate(const spa_pod *value, bool force_update) noexce
*/
for(const auto &rate : srates)
{
- if(rate >= MIN_OUTPUT_RATE && rate <= MAX_OUTPUT_RATE)
+ if(rate >= int{MinOutputRate} && rate <= int{MaxOutputRate})
{
if(!mSampleRate || force_update)
mSampleRate = static_cast<uint>(rate);
@@ -878,7 +878,7 @@ void DeviceNode::parseSampleRate(const spa_pod *value, bool force_update) noexce
TRACE(" sample rate: %d\n", srates[0]);
if(!mSampleRate || force_update)
- mSampleRate = static_cast<uint>(clampi(srates[0], MIN_OUTPUT_RATE, MAX_OUTPUT_RATE));
+ mSampleRate = static_cast<uint>(clampi(srates[0], MinOutputRate, MaxOutputRate));
return;
}