#include "pbd/signals.h"
#include "pbd/stateful.h"
+#include "ardour/libardour_visibility.h"
#include "ardour/types.h"
#include "ardour/automation_control.h"
#include "ardour/automatable.h"
+
+/* This section is for actual panners to use. They will include this file,
+ * declare ARDOURPANNER_DLL_EXPORTS during compilation, and ... voila.
+ */
+
+#ifdef ARDOURPANNER_DLL_EXPORTS // defined if we are building a panner implementation
+ #define ARDOURPANNER_API LIBARDOUR_DLL_EXPORT
+ #else
+ #define ARDOURPANNER_API LIBARDOUR_DLL_IMPORT
+ #endif
+#define ARDOURPANNER_LOCAL LIBARDOUR_DLL_LOCAL
+
namespace ARDOUR {
class Session;
class AudioBuffer;
class Speakers;
-class Panner : public PBD::Stateful, public PBD::ScopedConnectionList
+class LIBARDOUR_API Panner : public PBD::Stateful, public PBD::ScopedConnectionList
{
public:
Panner (boost::shared_ptr<Pannable>);
virtual bool clamp_width (double&) { return true; }
virtual bool clamp_elevation (double&) { return true; }
+ virtual std::pair<double, double> position_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); }
+ virtual std::pair<double, double> width_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); }
+ virtual std::pair<double, double> elevation_range () const { return std::make_pair (-DBL_MAX, DBL_MAX); }
+
virtual void set_position (double) { }
virtual void set_width (double) { }
virtual void set_elevation (double) { }
virtual void reset () = 0;
+ /* azimut, width or elevation updated -> recalc signal_position -> emit Changed */
+ PBD::Signal0<void> SignalPositionChanged;
+
void set_automation_state (AutoState);
AutoState automation_state() const;
void set_automation_style (AutoStyle);
int set_state (const XMLNode&, int version);
XMLNode& get_state ();
-
+
boost::shared_ptr<Pannable> pannable() const { return _pannable; }
static bool equivalent (pan_t a, pan_t b) {
} // namespace
extern "C" {
-struct PanPluginDescriptor {
+struct LIBARDOUR_API PanPluginDescriptor {
std::string name;
+ std::string panner_uri;
+ std::string gui_uri;
int32_t in;
int32_t out;
+ uint32_t priority;
ARDOUR::Panner* (*factory)(boost::shared_ptr<ARDOUR::Pannable>, boost::shared_ptr<ARDOUR::Speakers>);
};
}