From 60f767713227b5405b855e6e6e2a0475ecd96bcc Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 4 Aug 2023 20:07:44 +1000 Subject: Do our own resampling --- src/codecs/include/codec.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/codecs/include/codec.hpp') 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 #include +#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 duration_seconds; @@ -76,7 +76,7 @@ class ICodec { -> Result = 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 input, - cpp::span output) + cpp::span output) -> Result = 0; virtual auto SeekStream(cpp::span input, -- cgit v1.2.3 From c38754401b95642b5e61fd273c2adf7d76a829fe Mon Sep 17 00:00:00 2001 From: jacqueline Date: Mon, 7 Aug 2023 18:22:15 +1000 Subject: Downscaling working! --- src/codecs/include/codec.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codecs/include/codec.hpp') diff --git a/src/codecs/include/codec.hpp b/src/codecs/include/codec.hpp index f260aca4..32ebef69 100644 --- a/src/codecs/include/codec.hpp +++ b/src/codecs/include/codec.hpp @@ -16,8 +16,8 @@ #include #include -#include "sample.hpp" #include "result.hpp" +#include "sample.hpp" #include "span.hpp" #include "types.hpp" -- cgit v1.2.3