along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#ifndef __ardour_redirect_h__
class Session;
-struct RedirectState : public StateManager::State {
- RedirectState (string why)
- : StateManager::State (why) {}
- ~RedirectState () {}
-
- bool active;
-};
-
class Redirect : public IO
{
public:
Placement placement() const { return _placement; }
void set_placement (Placement, void *src);
- virtual void run (BufferSet& bufs, jack_nframes_t nframes, jack_nframes_t offset) = 0;
+ virtual void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0;
virtual void activate () = 0;
virtual void deactivate () = 0;
- virtual jack_nframes_t latency() { return 0; }
+ virtual nframes_t latency() { return 0; }
- virtual void set_block_size (jack_nframes_t nframes) {}
+ virtual void set_block_size (nframes_t nframes) {}
sigc::signal<void,Redirect*,void*> active_changed;
sigc::signal<void,Redirect*,void*> placement_changed;
sigc::signal<void,Redirect*,bool> AutomationPlaybackChanged;
sigc::signal<void,Redirect*,uint32_t> AutomationChanged;
- sigc::signal<void,Redirect*> GoingAway;
static sigc::signal<void,Redirect*> RedirectCreated;
XMLNode& get_state (void);
int set_state (const XMLNode&);
- StateManager::State* state_factory (string why) const;
- Change restore_state (StateManager::State&);
-
void *get_gui () const { return _gui; }
void set_gui (void *p) { _gui = p; }
return 1.0f;
}
- int load_automation (string path);
- int save_automation (string path);
-
void what_has_automation (set<uint32_t>&) const;
void what_has_visible_automation (set<uint32_t>&) const;
const set<uint32_t>& what_can_be_automated () const { return can_automate_list; }
void mark_automation_visible (uint32_t, bool);
AutomationList& automation_list (uint32_t);
- bool find_next_event (jack_nframes_t, jack_nframes_t, ControlEvent&) const;
+ bool find_next_event (nframes_t, nframes_t, ControlEvent&) const;
- virtual void transport_stopped (jack_nframes_t frame) {};
+ virtual void transport_stopped (nframes_t frame) {};
+
+ bool get_next_ab_is_active () const { return _next_ab_is_active; }
+ void set_next_ab_is_active (bool yn);
protected:
- void set_placement (const string&, void *src);
-
/* children may use this stuff as they see fit */
map<uint32_t,AutomationList*> parameter_automation;
void can_automate (uint32_t);
set<uint32_t> can_automate_list;
- void store_state (RedirectState&) const;
-
virtual void automation_list_creation_callback (uint32_t, AutomationList&) {}
+ int set_automation_state (const XMLNode&);
+ XMLNode& get_automation_state ();
+
private:
bool _active;
+ bool _next_ab_is_active;
Placement _placement;
uint32_t _sort_key;
void* _gui; /* generic, we don't know or care what this is */
+
+ int old_set_automation_state (const XMLNode&);
+ int load_automation (std::string path);
};
} // namespace ARDOUR