diff flattendynamics-ladspa.h @ 0:7632b9bf0cff

Initial stub plugin commit
author Chris Cannam
date Thu, 17 Jul 2014 12:16:02 +0100
parents
children f21753c504e1
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flattendynamics-ladspa.h	Thu Jul 17 12:16:02 2014 +0100
@@ -0,0 +1,45 @@
+/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
+
+#ifndef FLATTENDYNAMICS_LADSPA_H
+#define FLATTENDYNAMICS_LADSPA_H
+
+#include <ladspa.h>
+
+class FlattenDynamics
+{
+public:
+    static const LADSPA_Descriptor *getDescriptor(unsigned long index);
+
+private:
+    FlattenDynamics(int sampleRate);
+    ~FlattenDynamics();
+
+    enum {
+        InputPort     = 0,
+	OutputPort    = 1,
+	PortCount     = 2,
+    };
+
+    static const char *const portNames[PortCount];
+    static const LADSPA_PortDescriptor ports[PortCount];
+    static const LADSPA_PortRangeHint hints[PortCount];
+    static const LADSPA_Properties properties;
+    static const LADSPA_Descriptor ladspaDescriptor;
+
+    static LADSPA_Handle instantiate(const LADSPA_Descriptor *, unsigned long);
+    static void connectPort(LADSPA_Handle, unsigned long, LADSPA_Data *);
+    static void activate(LADSPA_Handle);
+    static void run(LADSPA_Handle, unsigned long);
+    static void deactivate(LADSPA_Handle);
+    static void cleanup(LADSPA_Handle);
+
+    void reset();
+    void runImpl(unsigned long);
+    void updateParameters();
+
+    int m_sampleRate;
+    float *m_input;
+    float *m_output;
+};
+
+#endif