MCPcopy Create free account
hub / github.com/crownengine/crown / processUpdates

Method processUpdates

3rdparty/openal/alc/alc.cpp:1541–1565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1539
1540
1541void ALCcontext::processUpdates()
1542{
1543 std::lock_guard<std::mutex> _{mPropLock};
1544 if(mDeferUpdates.exchange(false))
1545 {
1546 /* Tell the mixer to stop applying updates, then wait for any active
1547 * updating to finish, before providing updates.
1548 */
1549 mHoldUpdates.store(true, std::memory_order_release);
1550 while((mUpdateCount.load(std::memory_order_acquire)&1) != 0)
1551 std::this_thread::yield();
1552
1553 if(!mPropsClean.test_and_set(std::memory_order_acq_rel))
1554 UpdateContextProps(this);
1555 if(!mListener.PropsClean.test_and_set(std::memory_order_acq_rel))
1556 UpdateListenerProps(this);
1557 UpdateAllEffectSlotProps(this);
1558 UpdateAllSourceProps(this);
1559
1560 /* Now with all updates declared, let the mixer continue applying them
1561 * so they all happen at once.
1562 */
1563 mHoldUpdates.store(false, std::memory_order_release);
1564 }
1565}
1566
1567
1568/* alcSetError

Callers 2

state.cppFile · 0.80
alc.cppFile · 0.80

Calls 7

yieldFunction · 0.85
UpdateContextPropsFunction · 0.85
UpdateListenerPropsFunction · 0.85
UpdateAllEffectSlotPropsFunction · 0.85
UpdateAllSourcePropsFunction · 0.85
storeMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected