diff options
Diffstat (limited to 'src/audio/include/audio_decoder.hpp')
| -rw-r--r-- | src/audio/include/audio_decoder.hpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/audio/include/audio_decoder.hpp b/src/audio/include/audio_decoder.hpp index a6b15d9e..eaef2f8c 100644 --- a/src/audio/include/audio_decoder.hpp +++ b/src/audio/include/audio_decoder.hpp @@ -21,11 +21,15 @@ class AudioDecoder : public IAudioElement { AudioDecoder(); ~AudioDecoder(); - auto SetInputBuffer(MessageBufferHandle_t*) -> void; - auto SetOutputBuffer(MessageBufferHandle_t*) -> void; - auto StackSizeBytes() const -> std::size_t override { return 8196; }; + auto InputMinChunkSize() const -> std::size_t override { + // 128 kbps MPEG-1 @ 44.1 kHz is approx. 418 bytes according to the + // internet. + // TODO(jacqueline): tune as more codecs are added. + return 1024; + } + auto ProcessStreamInfo(const StreamInfo& info) -> cpp::result<void, AudioProcessingError> override; auto ProcessChunk(const cpp::span<std::byte>& chunk) @@ -38,9 +42,6 @@ class AudioDecoder : public IAudioElement { private: std::unique_ptr<codecs::ICodec> current_codec_; std::optional<StreamInfo> stream_info_; - - std::byte* raw_chunk_buffer_; - cpp::span<std::byte> chunk_buffer_; }; } // namespace audio |
