diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-29 23:52:22 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-10-29 23:52:22 +0100 |
commit | f1a3db6d7dc1461bcf4a8933a77267698fdffd30 (patch) | |
tree | b20e5054899335f340e26b9220c85691eeb70087 /src/FormatConverter.h | |
parent | 933021ed44e6c1bd2cf1dee91fc033c145c061af (diff) | |
download | dabmod-f1a3db6d7dc1461bcf4a8933a77267698fdffd30.tar.gz dabmod-f1a3db6d7dc1461bcf4a8933a77267698fdffd30.tar.bz2 dabmod-f1a3db6d7dc1461bcf4a8933a77267698fdffd30.zip |
Rework fixed point config setting
Diffstat (limited to 'src/FormatConverter.h')
-rw-r--r-- | src/FormatConverter.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/FormatConverter.h b/src/FormatConverter.h index 27ca0b1..1ed2283 100644 --- a/src/FormatConverter.h +++ b/src/FormatConverter.h @@ -41,8 +41,10 @@ class FormatConverter : public ModCodec public: static size_t get_format_size(const std::string& format); - // Allowed formats: s8, u8 and s16 - FormatConverter(const std::string& format); + // floating-point input allows output formats: s8, u8 and s16 + // complexfix_wide input allows output formats: s16 + // complexfix input is already in s16, and needs no converter + FormatConverter(bool input_is_complexfix_wide, const std::string& format_out); virtual ~FormatConverter(); int process(Buffer* const dataIn, Buffer* dataOut); @@ -51,7 +53,8 @@ class FormatConverter : public ModCodec size_t get_num_clipped_samples() const; private: - std::string m_format; + bool m_input_complexfix_wide; + std::string m_format_out; std::atomic<size_t> m_num_clipped_samples = 0; }; |