diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-08-04 20:07:44 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-08-04 20:07:44 +1000 |
| commit | 60f767713227b5405b855e6e6e2a0475ecd96bcc (patch) | |
| tree | fe55b7048e9e7f1f587f465a1845aef9d3b7b731 /src/codecs/include/codec.hpp | |
| parent | 3b240d1cd5c52caf189ca036a1a841f7e6d84ccd (diff) | |
| download | tangara-fw-60f767713227b5405b855e6e6e2a0475ecd96bcc.tar.gz | |
Do our own resampling
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..f260aca4 100644 --- a/src/codecs/include/codec.hpp +++ b/src/codecs/include/codec.hpp @@ -16,6 +16,7 @@ #include <string> #include <utility> +#include "sample.hpp" #include "result.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, |
