diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-08-28 09:43:41 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-08-28 09:45:19 +1000 |
| commit | 8f4e1ece7512c2b911491d87edc475b803c3989c (patch) | |
| tree | c03ad6bea2cde92c4b3ef9075655cbd685af73e1 /src/tangara/audio/processor.hpp | |
| parent | f253d2ee7568b61ce2fab962f7328a50e2da6adf (diff) | |
| download | tangara-fw-8f4e1ece7512c2b911491d87edc475b803c3989c.tar.gz | |
Some minor cleanup, docs, assertions
Diffstat (limited to 'src/tangara/audio/processor.hpp')
| -rw-r--r-- | src/tangara/audio/processor.hpp | 5 |
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; |
