summaryrefslogtreecommitdiff
path: root/src/tangara/audio/processor.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-08-28 09:43:41 +1000
committerjacqueline <me@jacqueline.id.au>2024-08-28 09:45:19 +1000
commit8f4e1ece7512c2b911491d87edc475b803c3989c (patch)
treec03ad6bea2cde92c4b3ef9075655cbd685af73e1 /src/tangara/audio/processor.hpp
parentf253d2ee7568b61ce2fab962f7328a50e2da6adf (diff)
downloadtangara-fw-8f4e1ece7512c2b911491d87edc475b803c3989c.tar.gz
Some minor cleanup, docs, assertions
Diffstat (limited to 'src/tangara/audio/processor.hpp')
-rw-r--r--src/tangara/audio/processor.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tangara/audio/processor.hpp b/src/tangara/audio/processor.hpp
index f1b1d921..45e05291 100644
--- a/src/tangara/audio/processor.hpp
+++ b/src/tangara/audio/processor.hpp
@@ -87,15 +87,20 @@ class SampleProcessor {
StreamBufferHandle_t source_;
drivers::PcmBuffer& sink_;
+ /* Internal utility for managing buffering samples between our filters. */
class Buffer {
public:
Buffer();
~Buffer();
+ /* Returns a span of the unused space within the buffer. */
auto writeAcquire() -> std::span<sample::Sample>;
+ /* Signals how many samples were just added to the writeAcquire span. */
auto writeCommit(size_t) -> void;
+ /* Returns a span of the samples stored within the buffer. */
auto readAcquire() -> std::span<sample::Sample>;
+ /* Signals how many samples from the readAcquire span were consumed. */
auto readCommit(size_t) -> void;
auto isEmpty() -> bool;