#include <ardour/ardour.h>
#include <ardour/utils.h>
-#include <ardour/state_manager.h>
#include <ardour/curve.h>
#include <ardour/types.h>
#include <ardour/data_type.h>
* An IO can contain ports of varying types, making routes/inserts/etc with
* varied combinations of types (eg MIDI and audio) possible.
*/
-class IO : public PBD::StatefulDestructible, public ARDOUR::StateManager
+class IO : public PBD::StatefulDestructible
{
public:
const string& name() const { return _name; }
virtual int set_name (string str, void *src);
- virtual void silence (jack_nframes_t, jack_nframes_t offset);
+ virtual void silence (nframes_t, nframes_t offset);
// These should be moved in to a separate object that manipulates an IO
- void pan (vector<Sample*>& bufs, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset, gain_t gain_coeff);
- void pan_automated (vector<Sample*>& bufs, uint32_t nbufs, jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t nframes, jack_nframes_t offset);
- void collect_input (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset);
- void deliver_output (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset);
- void deliver_output_no_pan (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes, jack_nframes_t offset);
- void just_meter_input (jack_nframes_t start_frame, jack_nframes_t end_frame,
- jack_nframes_t nframes, jack_nframes_t offset);
+ void pan (vector<Sample*>& bufs, uint32_t nbufs, nframes_t nframes, nframes_t offset, gain_t gain_coeff);
+ void pan_automated (vector<Sample*>& bufs, uint32_t nbufs, nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, nframes_t offset);
+ void collect_input (vector<Sample*>&, uint32_t nbufs, nframes_t nframes, nframes_t offset);
+ void deliver_output (vector<Sample*>&, uint32_t nbufs, nframes_t nframes, nframes_t offset);
+ void deliver_output_no_pan (vector<Sample*>&, uint32_t nbufs, nframes_t nframes, nframes_t offset);
+ void just_meter_input (nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, nframes_t offset);
virtual uint32_t n_process_buffers () { return 0; }
int disconnect_inputs (void *src);
int disconnect_outputs (void *src);
- jack_nframes_t output_latency() const;
- jack_nframes_t input_latency() const;
- void set_port_latency (jack_nframes_t);
+ nframes_t output_latency() const;
+ nframes_t input_latency() const;
+ void set_port_latency (nframes_t);
Port *output (uint32_t n) const {
if (n < _noutputs) {
XMLNode& get_state (void);
int set_state (const XMLNode&);
- virtual UndoAction get_memento() const;
-
-
static int disable_connecting (void);
-
static int enable_connecting (void);
-
static int disable_ports (void);
-
static int enable_ports (void);
-
static int disable_panners (void);
-
static int reset_panners (void);
static sigc::signal<int> PortsLegal;
AutoStyle gain_automation_style () const { return _gain_automation_curve.automation_style(); }
sigc::signal<void> gain_automation_style_changed;
- static void set_automation_interval (jack_nframes_t frames) {
- _automation_interval = frames;
- }
-
- static jack_nframes_t automation_interval() {
- return _automation_interval;
- }
-
- virtual void transport_stopped (jack_nframes_t now);
- virtual void automation_snapshot (jack_nframes_t now);
+ virtual void transport_stopped (nframes_t now);
ARDOUR::Curve& gain_automation_curve () { return _gain_automation_curve; }
void start_pan_touch (uint32_t which);
void end_pan_touch (uint32_t which);
- const PBD::ID& id() const { return _id; }
-
void defer_pan_reset ();
void allow_pan_reset ();
string _name;
Connection* _input_connection;
Connection* _output_connection;
- PBD::ID _id;
bool no_panner_reset;
XMLNode* deferred_state;
- DataType _default_type;
+ DataType _default_type;
+ bool _ignore_gain_on_deliver;
+
virtual void set_deferred_state() {}
virtual uint32_t pans_required() const { return _ninputs; }
- static void apply_declick (vector<Sample*>&, uint32_t nbufs, jack_nframes_t nframes,
+ static void apply_declick (vector<Sample*>&, uint32_t nbufs, nframes_t nframes,
gain_t initial, gain_t target, bool invert_polarity);
struct GainControllable : public PBD::Controllable {
- GainControllable (IO& i) : io (i) {}
+ GainControllable (std::string name, IO& i) : Controllable (name), io (i) {}
void set_value (float val);
float get_value (void) const;
GainControllable _gain_control;
- /* state management */
-
- Change restore_state (State&);
- StateManager::State* state_factory (std::string why) const;
-
- /* automation */
-
- jack_nframes_t last_automation_snapshot;
- static jack_nframes_t _automation_interval;
-
- AutoState _gain_automation_state;
+ AutoState _gain_automation_state;
AutoStyle _gain_automation_style;
bool apply_gain_automation;