aboutsummaryrefslogtreecommitdiffstats
path: root/src/FormatConverter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/FormatConverter.h')
-rw-r--r--src/FormatConverter.h12
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;
};