diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-08 20:25:42 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-08 20:25:42 +1000 |
| commit | e1181fbe59a835ea9c93d6e067e9757e8c522d3c (patch) | |
| tree | 2fd61bb93713de8c2205b7b6d0a8c84c49832e93 /src/codecs/include/codec.hpp | |
| parent | c3f40a8cc37114365ef3ec6f2888df64e5206b39 (diff) | |
| parent | 592f231627843bc44ebaaa4506aec26da1f56499 (diff) | |
| download | tangara-fw-e1181fbe59a835ea9c93d6e067e9757e8c522d3c.tar.gz | |
Merge branch 'main' into opus
Diffstat (limited to 'src/codecs/include/codec.hpp')
| -rw-r--r-- | src/codecs/include/codec.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codecs/include/codec.hpp b/src/codecs/include/codec.hpp index e8be8f0a..32ebef69 100644 --- a/src/codecs/include/codec.hpp +++ b/src/codecs/include/codec.hpp @@ -17,6 +17,7 @@ #include <utility> #include "result.hpp" +#include "sample.hpp" #include "span.hpp" #include "types.hpp" @@ -61,7 +62,6 @@ class ICodec { struct OutputFormat { uint8_t num_channels; - uint8_t bits_per_sample; uint32_t sample_rate_hz; std::optional<uint32_t> duration_seconds; @@ -76,7 +76,7 @@ class ICodec { -> Result<OutputFormat> = 0; struct OutputInfo { - std::size_t bytes_written; + std::size_t samples_written; bool is_finished_writing; }; @@ -84,7 +84,7 @@ class ICodec { * Writes PCM samples to the given output buffer. */ virtual auto ContinueStream(cpp::span<const std::byte> input, - cpp::span<std::byte> output) + cpp::span<sample::Sample> output) -> Result<OutputInfo> = 0; virtual auto SeekStream(cpp::span<const std::byte> input, |
