aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
Diffstat (limited to 'alc')
-rw-r--r--alc/alc.cpp4
-rw-r--r--alc/alu.cpp12
-rw-r--r--alc/backends/jack.cpp4
-rw-r--r--alc/backends/opensl.cpp12
-rw-r--r--alc/backends/pipewire.cpp14
-rw-r--r--alc/backends/pulseaudio.cpp24
-rw-r--r--alc/effects/reverb.cpp2
7 files changed, 36 insertions, 36 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index 2e474f3e..401a2ab6 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2414,7 +2414,7 @@ ALCenum UpdateDeviceParams(ALCdevice *device, const int *attrList)
bool ResetDeviceParams(ALCdevice *device, const int *attrList)
{
/* If the device was disconnected, reset it since we're opened anew. */
- if(!device->Connected.load(std::memory_order_relaxed)) [[alunlikely]]
+ if(!device->Connected.load(std::memory_order_relaxed)) [[unlikely]]
{
/* Make sure disconnection is finished before continuing on. */
device->waitForMix();
@@ -2446,7 +2446,7 @@ bool ResetDeviceParams(ALCdevice *device, const int *attrList)
}
ALCenum err{UpdateDeviceParams(device, attrList)};
- if(err == ALC_NO_ERROR) [[allikely]] return ALC_TRUE;
+ if(err == ALC_NO_ERROR) [[likely]] return ALC_TRUE;
alcSetError(device, err);
return ALC_FALSE;
diff --git a/alc/alu.cpp b/alc/alu.cpp
index a50a232e..dc5ed122 100644
--- a/alc/alu.cpp
+++ b/alc/alu.cpp
@@ -487,7 +487,7 @@ bool CalcEffectSlotParams(EffectSlot *slot, EffectSlot **sorted_slots, ContextBa
/* Otherwise, if it would be deleted send it off with a release event. */
RingBuffer *ring{context->mAsyncEvents.get()};
auto evt_vec = ring->getWriteVector();
- if(evt_vec.first.len > 0) [[allikely]]
+ if(evt_vec.first.len > 0) [[likely]]
{
AsyncEvent *evt{al::construct_at(reinterpret_cast<AsyncEvent*>(evt_vec.first.buf),
AsyncEvent::ReleaseEffectState)};
@@ -1526,7 +1526,7 @@ void CalcAttnSourceParams(Voice *voice, const VoiceProps *props, const ContextBa
}
/* Distance-based air absorption and initial send decay. */
- if(Distance > props->RefDistance) [[allikely]]
+ if(Distance > props->RefDistance) [[likely]]
{
const float distance_base{(Distance-props->RefDistance) * props->RolloffFactor};
const float distance_meters{distance_base * context->mParams.MetersPerUnit};
@@ -1821,7 +1821,7 @@ void ProcessParamUpdates(ContextBase *ctx, const EffectSlotArray &slots,
ProcessVoiceChanges(ctx);
IncrementRef(ctx->mUpdateCount);
- if(!ctx->mHoldUpdates.load(std::memory_order_acquire)) [[allikely]]
+ if(!ctx->mHoldUpdates.load(std::memory_order_acquire)) [[likely]]
{
bool force{CalcContextParams(ctx)};
auto sorted_slots = const_cast<EffectSlot**>(slots.data() + slots.size());
@@ -1913,7 +1913,7 @@ void ProcessContexts(DeviceBase *device, const uint SamplesToDo)
* left that don't target any sorted slots, they can't
* contribute to the output, so leave them.
*/
- if(next_target == split_point) [[alunlikely]]
+ if(next_target == split_point) [[unlikely]]
break;
--next_target;
@@ -1956,7 +1956,7 @@ void ApplyDistanceComp(const al::span<FloatBufferLine> Samples, const size_t Sam
float *inout{al::assume_aligned<16>(chanbuffer.data())};
auto inout_end = inout + SamplesToDo;
- if(SamplesToDo >= base) [[allikely]]
+ if(SamplesToDo >= base) [[likely]]
{
auto delay_end = std::rotate(inout, inout_end - base, inout_end);
std::swap_ranges(inout, delay_end, distbuf);
@@ -2131,7 +2131,7 @@ void DeviceBase::renderSamples(void *outBuffer, const uint numSamples, const siz
{
const uint samplesToDo{renderSamples(todo)};
- if(outBuffer) [[allikely]]
+ if(outBuffer) [[likely]]
{
/* Finally, interleave and convert samples, writing to the device's
* output buffer.
diff --git a/alc/backends/jack.cpp b/alc/backends/jack.cpp
index afa26b23..cbe1184d 100644
--- a/alc/backends/jack.cpp
+++ b/alc/backends/jack.cpp
@@ -340,7 +340,7 @@ int JackPlayback::processRt(jack_nframes_t numframes) noexcept
out[numchans++] = static_cast<float*>(jack_port_get_buffer(port, numframes));
}
- if(mPlaying.load(std::memory_order_acquire)) [[allikely]]
+ if(mPlaying.load(std::memory_order_acquire)) [[likely]]
mDevice->renderSamples({out.data(), numchans}, static_cast<uint>(numframes));
else
{
@@ -364,7 +364,7 @@ int JackPlayback::process(jack_nframes_t numframes) noexcept
}
jack_nframes_t total{0};
- if(mPlaying.load(std::memory_order_acquire)) [[allikely]]
+ if(mPlaying.load(std::memory_order_acquire)) [[likely]]
{
auto data = mRing->getReadVector();
jack_nframes_t todo{minu(numframes, static_cast<uint>(data.first.len))};
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 901d2ebe..b3c90880 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -147,9 +147,9 @@ const char *res_str(SLresult result) noexcept
return "Unknown error code";
}
-#define PRINTERR(x, s) do { \
- if((x) != SL_RESULT_SUCCESS) [[alunlikely]] \
- ERR("%s: %s\n", (s), res_str((x))); \
+#define PRINTERR(x, s) do { \
+ if((x) != SL_RESULT_SUCCESS) [[unlikely]] \
+ ERR("%s: %s\n", (s), res_str((x))); \
} while(0)
@@ -916,12 +916,12 @@ void OpenSLCapture::captureSamples(al::byte *buffer, uint samples)
}
SLAndroidSimpleBufferQueueItf bufferQueue{};
- if(mDevice->Connected.load(std::memory_order_acquire)) [[allikely]]
+ if(mDevice->Connected.load(std::memory_order_acquire)) [[likely]]
{
const SLresult result{VCALL(mRecordObj,GetInterface)(SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
&bufferQueue)};
PRINTERR(result, "recordObj->GetInterface");
- if(SL_RESULT_SUCCESS != result) [[alunlikely]]
+ if(SL_RESULT_SUCCESS != result) [[unlikely]]
{
mDevice->handleDisconnect("Failed to get capture buffer queue: 0x%08x", result);
bufferQueue = nullptr;
@@ -942,7 +942,7 @@ void OpenSLCapture::captureSamples(al::byte *buffer, uint samples)
SLresult result{SL_RESULT_SUCCESS};
auto wdata = mRing->getWriteVector();
- if(adv_count > wdata.second.len) [[allikely]]
+ if(adv_count > wdata.second.len) [[likely]]
{
auto len1 = std::min(wdata.first.len, adv_count-wdata.second.len);
auto buf1 = wdata.first.buf + chunk_size*(wdata.first.len-len1);
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index 48a1cb10..0539e0c9 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -474,7 +474,7 @@ struct EventManager {
*/
void waitForInit()
{
- if(!mInitDone.load(std::memory_order_acquire)) [[alunlikely]]
+ if(!mInitDone.load(std::memory_order_acquire)) [[unlikely]]
{
MainloopUniqueLock plock{mLoop};
plock.wait([this](){ return mInitDone.load(std::memory_order_acquire); });
@@ -857,7 +857,7 @@ void NodeProxy::infoCallback(const pw_node_info *info)
{
/* Can this actually change? */
const char *media_class{spa_dict_lookup(info->props, PW_KEY_MEDIA_CLASS)};
- if(!media_class) [[alunlikely]] return;
+ if(!media_class) [[unlikely]] return;
NodeType ntype{};
if(al::strcasecmp(media_class, AudioSinkClass) == 0)
@@ -901,7 +901,7 @@ void NodeProxy::paramCallback(int, uint32_t id, uint32_t, uint32_t, const spa_po
if(id == SPA_PARAM_EnumFormat)
{
DeviceNode *node{DeviceNode::Find(mId)};
- if(!node) [[alunlikely]] return;
+ if(!node) [[unlikely]] return;
if(const spa_pod_prop *prop{spa_pod_find_prop(param, nullptr, SPA_FORMAT_AUDIO_rate)})
node->parseSampleRate(&prop->value);
@@ -1326,7 +1326,7 @@ void PipeWirePlayback::ioChangedCallback(uint32_t id, void *area, uint32_t size)
void PipeWirePlayback::outputCallback()
{
pw_buffer *pw_buf{pw_stream_dequeue_buffer(mStream.get())};
- if(!pw_buf) [[alunlikely]] return;
+ if(!pw_buf) [[unlikely]] return;
const al::span<spa_data> datas{pw_buf->buffer->datas,
minu(mNumChannels, pw_buf->buffer->n_datas)};
@@ -1342,7 +1342,7 @@ void PipeWirePlayback::outputCallback()
uint length{mRateMatch ? mRateMatch->size : 0u};
#endif
/* If no length is specified, use the device's update size as a fallback. */
- if(!length) [[alunlikely]] length = mDevice->UpdateSize;
+ if(!length) [[unlikely]] length = mDevice->UpdateSize;
/* For planar formats, each datas[] seems to contain one channel, so store
* the pointers in an array. Limit the render length in case the available
@@ -1713,7 +1713,7 @@ ClockLatency PipeWirePlayback::getClockLatency()
*/
nanoseconds monoclock{seconds{tspec.tv_sec} + nanoseconds{tspec.tv_nsec}};
nanoseconds curtic{}, delay{};
- if(ptime.rate.denom < 1) [[alunlikely]]
+ if(ptime.rate.denom < 1) [[unlikely]]
{
/* If there's no stream rate, the stream hasn't had a chance to get
* going and return time info yet. Just use dummy values.
@@ -1811,7 +1811,7 @@ void PipeWireCapture::stateChangedCallback(pw_stream_state, pw_stream_state, con
void PipeWireCapture::inputCallback()
{
pw_buffer *pw_buf{pw_stream_dequeue_buffer(mStream.get())};
- if(!pw_buf) [[alunlikely]] return;
+ if(!pw_buf) [[unlikely]] return;
spa_data *bufdata{pw_buf->buffer->datas};
const uint offset{minu(bufdata->chunk->offset, bufdata->maxsize)};
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index 7f8a8fb3..0e9bf268 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -688,7 +688,7 @@ void PulsePlayback::streamWriteCallback(pa_stream *stream, size_t nbytes) noexce
pa_free_cb_t free_func{nullptr};
auto buflen = static_cast<size_t>(-1);
void *buf{};
- if(pa_stream_begin_write(stream, &buf, &buflen) || !buf) [[alunlikely]]
+ if(pa_stream_begin_write(stream, &buf, &buflen) || !buf) [[unlikely]]
{
buflen = nbytes;
buf = pa_xmalloc(buflen);
@@ -701,7 +701,7 @@ void PulsePlayback::streamWriteCallback(pa_stream *stream, size_t nbytes) noexce
mDevice->renderSamples(buf, static_cast<uint>(buflen/mFrameSize), mSpec.channels);
int ret{pa_stream_write(stream, buf, buflen, free_func, 0, PA_SEEK_RELATIVE)};
- if(ret != PA_OK) [[alunlikely]]
+ if(ret != PA_OK) [[unlikely]]
ERR("Failed to write to stream: %d, %s\n", ret, pa_strerror(ret));
} while(nbytes > 0);
}
@@ -1046,7 +1046,7 @@ ClockLatency PulsePlayback::getClockLatency()
err = pa_stream_get_latency(mStream, &latency, &neg);
}
- if(err != 0) [[alunlikely]]
+ if(err != 0) [[unlikely]]
{
/* If err = -PA_ERR_NODATA, it means we were called too soon after
* starting the stream and no timing info has been received from the
@@ -1057,7 +1057,7 @@ ClockLatency PulsePlayback::getClockLatency()
latency = mDevice->BufferSize - mDevice->UpdateSize;
neg = 0;
}
- else if(neg) [[alunlikely]]
+ else if(neg) [[unlikely]]
latency = 0;
ret.Latency = std::chrono::microseconds{latency};
@@ -1284,7 +1284,7 @@ void PulseCapture::captureSamples(al::byte *buffer, uint samples)
if(!mCapBuffer.empty())
{
const size_t rem{minz(dstbuf.size(), mCapBuffer.size())};
- if(mCapLen < 0) [[alunlikely]]
+ if(mCapLen < 0) [[unlikely]]
std::fill_n(dstbuf.begin(), rem, mSilentVal);
else
std::copy_n(mCapBuffer.begin(), rem, dstbuf.begin());
@@ -1294,7 +1294,7 @@ void PulseCapture::captureSamples(al::byte *buffer, uint samples)
continue;
}
- if(!mDevice->Connected.load(std::memory_order_acquire)) [[alunlikely]]
+ if(!mDevice->Connected.load(std::memory_order_acquire)) [[unlikely]]
break;
MainloopUniqueLock plock{mMainloop};
@@ -1305,14 +1305,14 @@ void PulseCapture::captureSamples(al::byte *buffer, uint samples)
mCapLen = 0;
}
const pa_stream_state_t state{pa_stream_get_state(mStream)};
- if(!PA_STREAM_IS_GOOD(state)) [[alunlikely]]
+ if(!PA_STREAM_IS_GOOD(state)) [[unlikely]]
{
mDevice->handleDisconnect("Bad capture state: %u", state);
break;
}
const void *capbuf;
size_t caplen;
- if(pa_stream_peek(mStream, &capbuf, &caplen) < 0) [[alunlikely]]
+ if(pa_stream_peek(mStream, &capbuf, &caplen) < 0) [[unlikely]]
{
mDevice->handleDisconnect("Failed retrieving capture samples: %s",
pa_strerror(pa_context_errno(mContext)));
@@ -1321,7 +1321,7 @@ void PulseCapture::captureSamples(al::byte *buffer, uint samples)
plock.unlock();
if(caplen == 0) break;
- if(!capbuf) [[alunlikely]]
+ if(!capbuf) [[unlikely]]
mCapLen = -static_cast<ssize_t>(caplen);
else
mCapLen = static_cast<ssize_t>(caplen);
@@ -1339,7 +1339,7 @@ uint PulseCapture::availableSamples()
{
MainloopUniqueLock plock{mMainloop};
size_t got{pa_stream_readable_size(mStream)};
- if(static_cast<ssize_t>(got) < 0) [[alunlikely]]
+ if(static_cast<ssize_t>(got) < 0) [[unlikely]]
{
const char *err{pa_strerror(static_cast<int>(got))};
ERR("pa_stream_readable_size() failed: %s\n", err);
@@ -1370,13 +1370,13 @@ ClockLatency PulseCapture::getClockLatency()
err = pa_stream_get_latency(mStream, &latency, &neg);
}
- if(err != 0) [[alunlikely]]
+ if(err != 0) [[unlikely]]
{
ERR("Failed to get stream latency: 0x%x\n", err);
latency = 0;
neg = 0;
}
- else if(neg) [[alunlikely]]
+ else if(neg) [[unlikely]]
latency = 0;
ret.Latency = std::chrono::microseconds{latency};
diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp
index 3464628c..4af9e2a8 100644
--- a/alc/effects/reverb.cpp
+++ b/alc/effects/reverb.cpp
@@ -1752,7 +1752,7 @@ void ReverbState::process(const size_t samplesToDo, const al::span<const FloatBu
}
/* Process reverb for these samples. */
- if(!mDoFading) [[allikely]]
+ if(!mDoFading) [[likely]]
{
/* Generate non-faded early reflections and late reverb. */
earlyUnfaded(offset, samplesToDo);