diff options
Diffstat (limited to 'alc/backends/pipewire.cpp')
-rw-r--r-- | alc/backends/pipewire.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index 057ab34b..48a1cb10 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -474,7 +474,7 @@ struct EventManager { */ void waitForInit() { - if(unlikely(!mInitDone.load(std::memory_order_acquire))) + if(!mInitDone.load(std::memory_order_acquire)) [[alunlikely]] { 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(unlikely(!media_class)) return; + if(!media_class) [[alunlikely]] 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(unlikely(!node)) return; + if(!node) [[alunlikely]] 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(unlikely(!pw_buf)) return; + if(!pw_buf) [[alunlikely]] 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(unlikely(!length)) length = mDevice->UpdateSize; + if(!length) [[alunlikely]] 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(unlikely(ptime.rate.denom < 1)) + if(ptime.rate.denom < 1) [[alunlikely]] { /* 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(unlikely(!pw_buf)) return; + if(!pw_buf) [[alunlikely]] return; spa_data *bufdata{pw_buf->buffer->datas}; const uint offset{minu(bufdata->chunk->offset, bufdata->maxsize)}; |