diff options
Diffstat (limited to 'media/libcubeb/src/cubeb_triple_buffer.h')
-rw-r--r-- | media/libcubeb/src/cubeb_triple_buffer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/media/libcubeb/src/cubeb_triple_buffer.h b/media/libcubeb/src/cubeb_triple_buffer.h index a5a5978fb4..759b92e62b 100644 --- a/media/libcubeb/src/cubeb_triple_buffer.h +++ b/media/libcubeb/src/cubeb_triple_buffer.h @@ -42,6 +42,13 @@ public: { return (shared_state.load(std::memory_order_relaxed) & BACK_DIRTY_BIT) != 0; } + // Reset state and indices to initial values. + void invalidate() + { + shared_state.store(0, std::memory_order_release); + input_idx = 1; + output_idx = 2; + } private: // Publish a value to the consumer. Returns true if the data was overwritten |