MayaFlux 0.3.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ try_acquire_processing()

bool MayaFlux::Buffers::AudioBuffer::try_acquire_processing ( )
inlineoverridevirtual

Attempts to acquire processing rights for the buffer.

Returns
True if processing rights were successfully acquired, false otherwise

This method is used to control access to the buffer's data during processing. It allows the buffer to manage concurrent access and ensure that only one processing operation occurs at a time. The specific implementation may vary based on the buffer type and its processing backend.

Implements MayaFlux::Buffers::Buffer.

Definition at line 319 of file AudioBuffer.hpp.

320 {
321 bool expected = false;
322 return m_is_processing.compare_exchange_strong(expected, true,
323 std::memory_order_acquire, std::memory_order_relaxed);
324 }
std::atomic< bool > m_is_processing