2 Copyright (C) 2006 Paul Davis
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2 of the License, or (at your option)
9 This program is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __ardour_delivery_h__
20 #define __ardour_delivery_h__
23 #include "ardour/types.h"
24 #include "ardour/chan_count.h"
25 #include "ardour/io_processor.h"
34 class Delivery : public IOProcessor {
43 Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<MuteMaster> mm, const std::string& name, Role);
44 Delivery (Session& s, boost::shared_ptr<MuteMaster> mm, const std::string& name, Role);
45 Delivery (Session&, boost::shared_ptr<MuteMaster> mm, const XMLNode&);
47 bool set_name (const std::string& name);
49 Role role() const { return _role; }
50 bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
51 bool configure_io (ChanCount in, ChanCount out);
53 void run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes);
55 /* supplemental method use with MIDI */
57 void flush (nframes_t nframes);
59 void no_outs_cuz_we_no_monitor(bool);
61 void mod_solo_level (int32_t);
62 uint32_t solo_level() const { return _solo_level; }
63 bool soloed () const { return (bool) _solo_level; }
65 bool solo_isolated() const { return _solo_isolated; }
66 void set_solo_isolated (bool);
68 void cycle_start (nframes_t);
69 void increment_output_offset (nframes_t);
70 void transport_stopped (sframes_t frame);
72 BufferSet& output_buffers() { return *_output_buffers; }
74 sigc::signal<void> MuteChange;
76 static sigc::signal<void,nframes_t> CycleStart;
78 XMLNode& state (bool full);
79 int set_state (const XMLNode&);
83 static int disable_panners (void);
84 static int reset_panners (void);
86 boost::shared_ptr<Panner> panner() const { return _panner; }
89 void defer_pan_reset ();
90 void allow_pan_reset ();
92 uint32_t pans_required() const { return _configured_input.n_audio(); }
93 void start_pan_touch (uint32_t which);
94 void end_pan_touch (uint32_t which);
98 BufferSet* _output_buffers;
100 nframes_t _output_offset;
101 bool _no_outs_cuz_we_no_monitor;
102 uint32_t _solo_level;
104 boost::shared_ptr<MuteMaster> _mute_master;
105 bool no_panner_reset;
106 boost::shared_ptr<Panner> _panner;
108 static bool panners_legal;
109 static sigc::signal<int> PannersLegal;
111 int panners_became_legal ();
112 sigc::connection panner_legal_c;
113 void output_changed (IOChange, void*);
115 gain_t target_gain ();
119 } // namespace ARDOUR
121 #endif // __ardour__h__