|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Stores a double and a bool in a single atomic uint64_t. More...
#include <src/dsp/atomic_position.h>
Public Member Functions | |
| AtomicDoubleWithBool (double d, bool b) noexcept | |
| void | store (double d, bool b) noexcept |
| std::pair< double, bool > | load () const noexcept |
Stores a double and a bool in a single atomic uint64_t.
The bool is stored in bit 0, and the double's LSB is cleared to make room. This causes up to 1 ULP of precision loss on the stored double, which is acceptable for DAW position values (far below sample-level precision). The error does not accumulate across repeated store/load cycles.
Definition at line 38 of file atomic_position.h.
|
inlinenoexcept |
Definition at line 47 of file atomic_position.h.
|
inlinenoexcept |
Definition at line 56 of file atomic_position.h.
|
inlinenoexcept |
Definition at line 49 of file atomic_position.h.