aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/opensl.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-12-05 14:51:03 -0800
committerChris Robinson <[email protected]>2022-12-05 14:51:03 -0800
commitdf6d61dd40b602af55f903564358b083bb8b37e4 (patch)
tree84113a098867e2ba82aa1f156911e94755fde727 /alc/backends/opensl.cpp
parent73df39b8f8cefa0c0fca0e287b548063e9e62636 (diff)
Use standard likely/unlikely attributes when available
Diffstat (limited to 'alc/backends/opensl.cpp')
-rw-r--r--alc/backends/opensl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 9ecde509..48642496 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -916,18 +916,18 @@ void OpenSLCapture::captureSamples(al::byte *buffer, uint samples)
}
SLAndroidSimpleBufferQueueItf bufferQueue{};
- if(likely(mDevice->Connected.load(std::memory_order_acquire)))
+ if(mDevice->Connected.load(std::memory_order_acquire)) [[allikely]]
{
const SLresult result{VCALL(mRecordObj,GetInterface)(SL_IID_ANDROIDSIMPLEBUFFERQUEUE,
&bufferQueue)};
PRINTERR(result, "recordObj->GetInterface");
- if(unlikely(SL_RESULT_SUCCESS != result))
+ if(SL_RESULT_SUCCESS != result) [[alunlikely]]
{
mDevice->handleDisconnect("Failed to get capture buffer queue: 0x%08x", result);
bufferQueue = nullptr;
}
}
- if(unlikely(!bufferQueue) || adv_count == 0)
+ if(!bufferQueue || adv_count == 0)
return;
/* For each buffer chunk that was fully read, queue another writable buffer
@@ -942,7 +942,7 @@ void OpenSLCapture::captureSamples(al::byte *buffer, uint samples)
SLresult result{SL_RESULT_SUCCESS};
auto wdata = mRing->getWriteVector();
- if(likely(adv_count > wdata.second.len))
+ if(adv_count > wdata.second.len) [[allikely]]
{
auto len1 = std::min(wdata.first.len, adv_count-wdata.second.len);
auto buf1 = wdata.first.buf + chunk_size*(wdata.first.len-len1);