diff options
| author | jacqueline <me@jacqueline.id.au> | 2022-12-06 13:17:56 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2022-12-06 13:17:56 +1100 |
| commit | f35bb64c2b8dbb72fd15f1880e4d01d263660910 (patch) | |
| tree | 4696065116c21147da02b6e6470a6215b343081f /src/audio/include/audio_element.hpp | |
| parent | e0b2562cc4e0e5ae73efacddf68b83bd9fbb6acb (diff) | |
| download | tangara-fw-f35bb64c2b8dbb72fd15f1880e4d01d263660910.tar.gz | |
basic i2s output element
Diffstat (limited to 'src/audio/include/audio_element.hpp')
| -rw-r--r-- | src/audio/include/audio_element.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/audio/include/audio_element.hpp b/src/audio/include/audio_element.hpp index 06e47b35..1973fccf 100644 --- a/src/audio/include/audio_element.hpp +++ b/src/audio/include/audio_element.hpp @@ -48,26 +48,26 @@ class IAudioElement { * be tuned according to the observed stack size of each element, as different * elements have fairly different stack requirements. */ - virtual auto StackSizeBytes() -> std::size_t { return 2048; }; + virtual auto StackSizeBytes() const -> std::size_t { return 2048; }; /* * How long to wait for new data on the input stream before triggering a call * to ProcessIdle(). If this is portMAX_DELAY (the default), then ProcessIdle * will never be called. */ - virtual auto IdleTimeout() -> TickType_t { return portMAX_DELAY; } + virtual auto IdleTimeout() const -> TickType_t { return portMAX_DELAY; } /* Returns this element's input buffer. */ - auto InputBuffer() -> MessageBufferHandle_t* { return input_buffer_; } + auto InputBuffer() const -> MessageBufferHandle_t* { return input_buffer_; } /* Returns this element's output buffer. */ - auto OutputBuffer() -> MessageBufferHandle_t* { return output_buffer_; } + auto OutputBuffer() const -> MessageBufferHandle_t* { return output_buffer_; } /* * Called when a StreamInfo message is received. Used to configure this * element in preperation for incoming chunks. */ - virtual auto ProcessStreamInfo(StreamInfo& info) + virtual auto ProcessStreamInfo(const StreamInfo& info) -> cpp::result<void, AudioProcessingError> = 0; /* @@ -76,7 +76,7 @@ class IAudioElement { * bytes in this chunk that were actually used; leftover bytes will be * prepended to the next call. */ - virtual auto ProcessChunk(cpp::span<std::byte>& chunk) + virtual auto ProcessChunk(const cpp::span<std::byte>& chunk) -> cpp::result<std::size_t, AudioProcessingError> = 0; /* |
