/** Class to pan from some number of inputs to some number of outputs.
* This class has a number of StreamPanners, one for each input.
*/
-class Panner : public SessionObject, public AutomatableControls
+class Panner : public SessionObject, public Automatable
{
public:
struct Output {
- float x;
- float y;
- pan_t current_pan;
- pan_t desired_pan;
-
- Output (float xp, float yp)
- : x (xp), y (yp), current_pan (0), desired_pan (0) {}
+ float x;
+ float y;
+ float z;
+ pan_t current_pan;
+ pan_t desired_pan;
+
+ Output (float xp, float yp, float zp = 0.0)
+ : x (xp), y (yp), z (zp), current_pan (0), desired_pan (0) {}
};
bool can_support_io_configuration (const ChanCount& /*in*/, ChanCount& /*out*/) const { return true; };
/// The fundamental Panner function
- void run (BufferSet& src, BufferSet& dest, sframes_t start_frame, sframes_t end_frames, nframes_t nframes);
+ void run (BufferSet& src, BufferSet& dest, framepos_t start_frame, framepos_t end_frames, nframes_t nframes);
bool bypassed() const { return _bypassed; }
void set_bypassed (bool yn);
StreamPanner &streampanner( uint32_t n ) const { assert( n < _streampanners.size() ); return *_streampanners[n]; }
uint32_t npanners() const { return _streampanners.size(); }
- PBD::Signal0<void> Changed;
+ PBD::Signal0<void> Changed; /* panner and/or outputs count changed */
PBD::Signal0<void> LinkStateChanged;
PBD::Signal0<void> StateChanged; /* for bypass */
AutomationList* alist() { return (AutomationList*)_list.get(); }
Panner& panner;
- void set_value (float);
- float get_value (void) const;
+ void set_value (double);
+ double get_value (void) const;
};
boost::shared_ptr<AutomationControl> pan_control (int id, int chan=0) {
return automation_control (Evoral::Parameter (PanAutomation, chan, id));
}
+ static std::string value_as_string (double);
+
private:
/* disallow copy construction */
Panner (Panner const &);
static float current_automation_version_number;
+ void setup_speakers (uint32_t nouts);
+
/* old school automation handling */
std::string automation_path;