diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-11-25 21:02:36 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-11-25 21:02:36 +0100 |
commit | 2e9500d4854a3db9e0f407021934407155b82776 (patch) | |
tree | 72681993fb7ebdadb9b9bc41fe9a6a8130ab1da3 /src/FormatConverter.h | |
parent | 23b5d884dbdb4ce6a20872cce6a48ea0eed39f39 (diff) | |
parent | d45cca6f447c9a72bc9eaeb9d861fa6fcff9e597 (diff) | |
download | dabmod-2e9500d4854a3db9e0f407021934407155b82776.tar.gz dabmod-2e9500d4854a3db9e0f407021934407155b82776.tar.bz2 dabmod-2e9500d4854a3db9e0f407021934407155b82776.zip |
Merge branch 'fixedpoint' into next
Diffstat (limited to 'src/FormatConverter.h')
-rw-r--r-- | src/FormatConverter.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/FormatConverter.h b/src/FormatConverter.h index 05511c0..1ed2283 100644 --- a/src/FormatConverter.h +++ b/src/FormatConverter.h @@ -33,18 +33,19 @@ #endif #include "ModPlugin.h" -#include <complex> #include <atomic> #include <string> -#include <cstdint> 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); const char* name(); @@ -52,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; }; |