/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <jack/types.h>
#include <ardour/ladspa.h>
-#include <ardour/plugin_state.h>
#include <ardour/plugin.h>
#include <ardour/ladspa_plugin.h>
class LadspaPlugin : public ARDOUR::Plugin
{
public:
- LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, jack_nframes_t sample_rate);
+ LadspaPlugin (void *module, ARDOUR::AudioEngine&, ARDOUR::Session&, uint32_t index, nframes_t sample_rate);
LadspaPlugin (const LadspaPlugin &);
~LadspaPlugin ();
const char * maker() const { return descriptor->Maker; }
uint32_t parameter_count() const { return descriptor->PortCount; }
float default_value (uint32_t port);
- jack_nframes_t latency() const;
+ nframes_t latency() const;
void set_parameter (uint32_t port, float val);
float get_parameter (uint32_t port) const;
int get_parameter_descriptor (uint32_t which, ParameterDescriptor&) const;
descriptor->cleanup (handle);
}
}
- void set_block_size (jack_nframes_t nframes) {}
+ void set_block_size (nframes_t nframes) {}
- int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, jack_nframes_t nframes, jack_nframes_t offset);
- void store_state (ARDOUR::PluginState&);
- void restore_state (ARDOUR::PluginState&);
+ int connect_and_run (vector<Sample*>& bufs, uint32_t maxbuf, int32_t& in, int32_t& out, nframes_t nframes, nframes_t offset);
string describe_parameter (uint32_t);
string state_node_name() const { return "ladspa"; }
void print_parameter (uint32_t, char*, uint32_t len) const;
void *module;
const LADSPA_Descriptor *descriptor;
LADSPA_Handle handle;
- jack_nframes_t sample_rate;
+ nframes_t sample_rate;
LADSPA_Data *control_data;
LADSPA_Data *shadow_data;
LADSPA_Data *latency_control_port;
uint32_t _index;
bool was_activated;
- void init (void *mod, uint32_t index, jack_nframes_t rate);
- void run (jack_nframes_t nsamples);
+ void init (void *mod, uint32_t index, nframes_t rate);
+ void run (nframes_t nsamples);
void latency_compute_run ();
};
-}
+
+class LadspaPluginInfo : public PluginInfo {
+ public:
+ LadspaPluginInfo () { };
+ ~LadspaPluginInfo () { };
+
+ PluginPtr load (Session& session);
+};
+
+typedef boost::shared_ptr<LadspaPluginInfo> LadspaPluginInfoPtr;
+
+} // namespace ARDOUR
#endif /* __ardour_ladspa_plugin_h__ */