summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/audio_buffer.h87
-rw-r--r--libs/ardour/ardour/audio_diskstream.h2
-rw-r--r--libs/ardour/ardour/audio_port.h11
-rw-r--r--libs/ardour/ardour/audio_track.h6
-rw-r--r--libs/ardour/ardour/audioengine.h2
-rw-r--r--libs/ardour/ardour/buffer.h8
-rw-r--r--libs/ardour/ardour/buffer_set.h4
-rw-r--r--libs/ardour/ardour/diskstream.h2
-rw-r--r--libs/ardour/ardour/io.h21
-rw-r--r--libs/ardour/ardour/io_processor.h6
-rw-r--r--libs/ardour/ardour/meter.h2
-rw-r--r--libs/ardour/ardour/midi_buffer.h7
-rw-r--r--libs/ardour/ardour/midi_diskstream.h4
-rw-r--r--libs/ardour/ardour/midi_port.h15
-rw-r--r--libs/ardour/ardour/midi_track.h11
-rw-r--r--libs/ardour/ardour/panner.h4
-rw-r--r--libs/ardour/ardour/plugin_insert.h4
-rw-r--r--libs/ardour/ardour/port.h24
-rw-r--r--libs/ardour/ardour/port_insert.h2
-rw-r--r--libs/ardour/ardour/processor.h6
-rw-r--r--libs/ardour/ardour/route.h22
-rw-r--r--libs/ardour/ardour/send.h2
-rw-r--r--libs/ardour/ardour/session.h22
-rw-r--r--libs/ardour/ardour/track.h6
24 files changed, 149 insertions, 131 deletions
diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h
index adcfb962f0..ca1b36e0b1 100644
--- a/libs/ardour/ardour/audio_buffer.h
+++ b/libs/ardour/ardour/audio_buffer.h
@@ -28,78 +28,86 @@ class AudioBuffer : public Buffer
{
public:
AudioBuffer(size_t capacity);
-
~AudioBuffer();
- void silence(nframes_t len, nframes_t offset = 0) {
+ void silence (nframes_t len, nframes_t offset = 0) {
if (!_silent) {
assert(_capacity > 0);
assert(offset + len <= _capacity);
memset(_data + offset, 0, sizeof (Sample) * len);
- if (offset == 0 && len == _capacity) {
+ if (len == _capacity) {
_silent = true;
}
}
+ _written = true;
}
- /** Read @a len frames FROM THE START OF @a src into self at @a offset */
- void read_from(const Buffer& src, nframes_t len, nframes_t offset) {
+ /** Read @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/
+ void read_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) {
assert(&src != this);
assert(_capacity > 0);
assert(src.type() == DataType::AUDIO);
- assert(offset + len <= _capacity);
- memcpy(_data + offset, ((AudioBuffer&)src).data(), sizeof(Sample) * len);
- _silent = src.silent();
+ assert(len <= _capacity);
+ memcpy(_data + dst_offset, ((AudioBuffer&)src).data() + src_offset, sizeof(Sample) * len);
+ if (dst_offset == 0 && src_offset == 0 && len == _capacity) {
+ _silent = src.silent();
+ } else {
+ _silent = _silent && src.silent();
+ }
+ _written = true;
}
- /** Accumulate (add)@a len frames FROM THE START OF @a src into self at @a offset */
- void accumulate_from(const AudioBuffer& src, nframes_t len, nframes_t offset) {
+ /** Acumulate (add) @a len frames @a src starting at @a src_offset into self starting at @ dst_offset*/
+ void accumulate_from (const AudioBuffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) {
assert(_capacity > 0);
- assert(offset + len <= _capacity);
+ assert(len <= _capacity);
- Sample* const dst_raw = _data + offset;
- const Sample* const src_raw = src.data();
+ Sample* const dst_raw = _data + dst_offset;
+ const Sample* const src_raw = src.data() + src_offset;
mix_buffers_no_gain(dst_raw, src_raw, len);
_silent = (src.silent() && _silent);
+ _written = true;
}
- /** Accumulate (add) @a len frames FROM THE START OF @a src into self at @a offset
+ /** Acumulate (add) @a len frames @a src starting at @a src_offset into self starting at @ dst_offset
* scaling by @a gain_coeff */
- void accumulate_with_gain_from(const AudioBuffer& src, nframes_t len, nframes_t offset, gain_t gain_coeff) {
+ void accumulate_with_gain_from (const AudioBuffer& src, nframes_t len, gain_t gain_coeff, nframes_t dst_offset = 0, nframes_t src_offset = 0) {
assert(_capacity > 0);
- assert(offset + len <= _capacity);
+ assert(len <= _capacity);
if (src.silent()) {
return;
}
- Sample* const dst_raw = _data + offset;
- const Sample* const src_raw = src.data();
+ Sample* const dst_raw = _data + dst_offset;
+ const Sample* const src_raw = src.data() + src_offset;
mix_buffers_with_gain (dst_raw, src_raw, len, gain_coeff);
_silent = ( (src.silent() && _silent) || (_silent && gain_coeff == 0) );
+ _written = true;
}
- /** Accumulate (add) @a len frames FROM THE START OF @a src into self at @a offset
+ /** Accumulate (add) @a len frames FROM THE START OF @a src into self
* scaling by @a gain_coeff */
- void accumulate_with_gain_from(const Sample* src_raw, nframes_t len, nframes_t offset, gain_t gain_coeff) {
+ void accumulate_with_gain_from (const Sample* src_raw, nframes_t len, gain_t gain_coeff, nframes_t dst_offset = 0) {
assert(_capacity > 0);
- assert(offset + len <= _capacity);
+ assert(len <= _capacity);
- Sample* const dst_raw = _data + offset;
+ Sample* const dst_raw = _data + dst_offset;
mix_buffers_with_gain (dst_raw, src_raw, len, gain_coeff);
_silent = (_silent && gain_coeff == 0);
+ _written = true;
}
- void apply_gain(gain_t gain, nframes_t len, nframes_t offset=0) {
- apply_gain_to_buffer (_data + offset, len, gain);
+ void apply_gain (gain_t gain, nframes_t len) {
+ apply_gain_to_buffer (_data, len, gain);
}
/** Set the data contained by this buffer manually (for setting directly to jack buffer).
@@ -112,6 +120,7 @@ public:
_size = size;
_data = data;
_silent = false;
+ _written = false;
}
/** Reallocate the buffer used internally to handle at least @nframes of data
@@ -120,33 +129,25 @@ public:
*/
void resize (size_t nframes);
- const Sample* data () const { return _data; }
- Sample* data () { return _data; }
-
- const Sample* data(nframes_t nframes, nframes_t offset) const
- { assert(offset + nframes <= _capacity); return _data + offset; }
-
- Sample* data (nframes_t nframes, nframes_t offset)
- { assert(offset + nframes <= _capacity); return _data + offset; }
- void replace_data (size_t nframes);
-
- void drop_data () {
- assert (_owns_data);
- assert (_data);
+ const Sample* data (nframes_t offset = 0) const {
+ assert(offset <= _capacity);
+ return _data + offset;
+ }
- free (_data);
- _data = 0;
- _size = 0;
- _capacity = 0;
- _silent = false;
+ Sample* data (nframes_t offset = 0) {
+ assert(offset <= _capacity);
+ return _data + offset;
}
- void copy_to_internal (Sample* p, nframes_t cnt, nframes_t offset);
+ void prepare () { _written = false; }
+ bool written() const { return _written; }
private:
bool _owns_data;
+ bool _written;
Sample* _data; ///< Actual buffer contents
+
};
diff --git a/libs/ardour/ardour/audio_diskstream.h b/libs/ardour/ardour/audio_diskstream.h
index 4f22efd535..7f4cdce6ec 100644
--- a/libs/ardour/ardour/audio_diskstream.h
+++ b/libs/ardour/ardour/audio_diskstream.h
@@ -215,7 +215,7 @@ class AudioDiskstream : public Diskstream
protected:
friend class AudioTrack;
- int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input);
+ int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input);
bool commit (nframes_t nframes);
private:
diff --git a/libs/ardour/ardour/audio_port.h b/libs/ardour/ardour/audio_port.h
index b928a3587d..85bac1f286 100644
--- a/libs/ardour/ardour/audio_port.h
+++ b/libs/ardour/ardour/audio_port.h
@@ -35,14 +35,15 @@ class AudioPort : public Port
return DataType::AUDIO;
}
- void cycle_start (nframes_t, nframes_t);
- void cycle_end (nframes_t, nframes_t);
+ void cycle_start (nframes_t);
+ void cycle_end (nframes_t);
+ void cycle_split ();
- Buffer& get_buffer (nframes_t nframes, nframes_t offset) {
+ Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) {
return get_audio_buffer (nframes, offset);
}
- AudioBuffer& get_audio_buffer (nframes_t, nframes_t);
+ AudioBuffer& get_audio_buffer (nframes_t nframes, nframes_t offset = 0);
protected:
friend class AudioEngine;
@@ -50,8 +51,8 @@ class AudioPort : public Port
AudioPort (std::string const &, Flags);
private:
- bool _buffer_data_set;
AudioBuffer* _buffer;
+
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/audio_track.h b/libs/ardour/ardour/audio_track.h
index bea763a176..22092b5e1b 100644
--- a/libs/ardour/ardour/audio_track.h
+++ b/libs/ardour/ardour/audio_track.h
@@ -40,13 +40,13 @@ class AudioTrack : public Track
bool can_use_mode (TrackMode m, bool& bounce_required);
int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
+ int declick, bool can_record, bool rec_monitors_input);
int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
+ bool state_changing, bool can_record, bool rec_monitors_input);
int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool can_record, bool rec_monitors_input);
+ bool can_record, bool rec_monitors_input);
boost::shared_ptr<AudioDiskstream> audio_diskstream() const;
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h
index 5c9317ae7b..54154141f6 100644
--- a/libs/ardour/ardour/audioengine.h
+++ b/libs/ardour/ardour/audioengine.h
@@ -123,6 +123,8 @@ class AudioEngine : public sigc::trackable
Port *register_input_port (DataType, const std::string& portname);
Port *register_output_port (DataType, const std::string& portname);
int unregister_port (Port &);
+
+ void split_cycle (nframes_t offset);
int connect (const std::string& source, const std::string& destination);
int disconnect (const std::string& source, const std::string& destination);
diff --git a/libs/ardour/ardour/buffer.h b/libs/ardour/ardour/buffer.h
index 1b673503e3..da75556877 100644
--- a/libs/ardour/ardour/buffer.h
+++ b/libs/ardour/ardour/buffer.h
@@ -67,15 +67,15 @@ public:
* The buffer is not silent after this operation. the @a capacity argument
* passed to the constructor must have been non-zero.
*/
- virtual void resize(size_t) = 0;
+ virtual void resize (size_t) = 0;
- /** Clear (eg zero, or empty) buffer starting at TIME @a offset */
- virtual void silence(nframes_t len, nframes_t offset=0) = 0;
+ /** Clear (eg zero, or empty) buffer */
+ virtual void silence (nframes_t len, nframes_t offset = 0) = 0;
/** Clear the entire buffer */
virtual void clear() { silence(_capacity, 0); }
- virtual void read_from(const Buffer& src, nframes_t offset, nframes_t len) = 0;
+ virtual void read_from (const Buffer& src, nframes_t len, nframes_t dst_offset = 0, nframes_t src_offset = 0) = 0;
protected:
Buffer(DataType type, size_t capacity)
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index 28350d8d2f..f02470c3e8 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -53,7 +53,7 @@ public:
void clear();
- void attach_buffers(PortSet& ports, nframes_t nframes, nframes_t offset);
+ void attach_buffers(PortSet& ports, nframes_t nframes, nframes_t offset = 0);
void ensure_buffers(const ChanCount& count, size_t buffer_capacity);
void ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capacity);
@@ -81,7 +81,7 @@ public:
return (MidiBuffer&)get(DataType::MIDI, i);
}
- void read_from(BufferSet& in, jack_nframes_t nframes, jack_nframes_t offset=0);
+ void read_from(BufferSet& in, nframes_t nframes);
// ITERATORS
// FIXME: possible to combine these? templates?
diff --git a/libs/ardour/ardour/diskstream.h b/libs/ardour/ardour/diskstream.h
index a5a98338da..56400360d2 100644
--- a/libs/ardour/ardour/diskstream.h
+++ b/libs/ardour/ardour/diskstream.h
@@ -188,7 +188,7 @@ class Diskstream : public SessionObject, public boost::noncopyable
friend class Track;
virtual void prepare ();
- virtual int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input) = 0;
+ virtual int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input) = 0;
virtual bool commit (nframes_t nframes) = 0;
virtual void recover (); /* called if commit will not be called, but process was */
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index 709a5368db..6b309bf50c 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -101,13 +101,11 @@ class IO : public SessionObject, public AutomatableControls, public Latent
bool set_name (const string& str);
- virtual void silence (nframes_t, nframes_t offset);
+ virtual void silence (nframes_t);
- void collect_input (BufferSet& bufs, nframes_t nframes, nframes_t offset);
- void deliver_output (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset);
- void just_meter_input (nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset);
+ void collect_input (BufferSet& bufs, nframes_t nframes);
+ void deliver_output (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
+ void just_meter_input (nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
BufferSet& output_buffers() { return *_output_buffers; }
@@ -213,6 +211,7 @@ class IO : public SessionObject, public AutomatableControls, public Latent
/// raised when the number of input or output ports changes
static sigc::signal<void,ChanCount> PortCountChanged;
static sigc::signal<int> PortsCreated;
+ static sigc::signal<void,nframes_t> CycleStart;
static void update_meters();
static std::string name_from_state (const XMLNode&);
@@ -287,9 +286,10 @@ class IO : public SessionObject, public AutomatableControls, public Latent
bool _denormal_protection;
XMLNode* deferred_state;
DataType _default_type;
+ nframes_t _output_offset;
- virtual void prepare_inputs (nframes_t nframes, nframes_t offset);
- virtual void flush_outputs (nframes_t nframes, nframes_t offset);
+ virtual void prepare_inputs (nframes_t nframes);
+ virtual void flush_outputs (nframes_t nframes);
virtual void set_deferred_state() {}
@@ -310,13 +310,16 @@ class IO : public SessionObject, public AutomatableControls, public Latent
int set_inputs (const string& str);
int set_outputs (const string& str);
+ void increment_output_offset (nframes_t);
+ void cycle_start (nframes_t);
+
static bool connecting_legal;
static bool ports_legal;
private:
static bool panners_legal;
- void copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes, nframes_t offset);
+ void copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes);
int connecting_became_legal ();
int panners_became_legal ();
diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h
index d571821080..1a12a3271e 100644
--- a/libs/ardour/ardour/io_processor.h
+++ b/libs/ardour/ardour/io_processor.h
@@ -60,10 +60,8 @@ class IOProcessor : public Processor
virtual void automation_snapshot (nframes_t now, bool force);
- virtual void run_in_place (BufferSet& in, nframes_t start, nframes_t end,
- nframes_t nframes, nframes_t offset) = 0;
-
- void silence (nframes_t nframes, nframes_t offset);
+ virtual void run_in_place (BufferSet& in, nframes_t start, nframes_t end, nframes_t nframes) = 0;
+ void silence (nframes_t nframes);
sigc::signal<void,IOProcessor*,bool> AutomationPlaybackChanged;
sigc::signal<void,IOProcessor*,uint32_t> AutomationChanged;
diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h
index 99aacfeb15..972e1b6760 100644
--- a/libs/ardour/ardour/meter.h
+++ b/libs/ardour/ardour/meter.h
@@ -44,7 +44,7 @@ public:
bool configure_io (ChanCount in, ChanCount out);
/** Compute peaks */
- void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
+ void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
float peak_power (uint32_t n) {
if (n < _visible_peak_power.size()) {
diff --git a/libs/ardour/ardour/midi_buffer.h b/libs/ardour/ardour/midi_buffer.h
index 9c2ee466d3..70e2203df4 100644
--- a/libs/ardour/ardour/midi_buffer.h
+++ b/libs/ardour/ardour/midi_buffer.h
@@ -37,9 +37,8 @@ public:
MidiBuffer(size_t capacity);
~MidiBuffer();
- void silence(nframes_t dur, nframes_t offset=0);
-
- void read_from(const Buffer& src, nframes_t nframes, nframes_t offset);
+ void silence (nframes_t nframes, nframes_t offset = 0);
+ void read_from (const Buffer& src, nframes_t nframes, nframes_t dst_offset = 0, nframes_t src_offset = 0);
void copy(const MidiBuffer& copy);
@@ -54,7 +53,7 @@ public:
template<typename BufferType, typename EventType>
struct iterator_base {
- iterator_base<BufferType, EventType>(BufferType& b, size_t o) : buffer(b), offset(o) {}
+ iterator_base<BufferType, EventType>(BufferType& b, nframes_t o) : buffer(b), offset(o) {}
inline EventType operator*() const {
uint8_t* ev_start = buffer._data + offset + sizeof(TimeType);
int event_size = Evoral::midi_event_size(ev_start);
diff --git a/libs/ardour/ardour/midi_diskstream.h b/libs/ardour/ardour/midi_diskstream.h
index 9632c1566a..26198e1c62 100644
--- a/libs/ardour/ardour/midi_diskstream.h
+++ b/libs/ardour/ardour/midi_diskstream.h
@@ -65,7 +65,7 @@ class MidiDiskstream : public Diskstream
float playback_buffer_load() const;
float capture_buffer_load() const;
- void get_playback(MidiBuffer& dst, nframes_t start, nframes_t end, nframes_t offset);
+ void get_playback(MidiBuffer& dst, nframes_t start, nframes_t end);
void set_record_enabled (bool yn);
@@ -136,7 +136,7 @@ class MidiDiskstream : public Diskstream
protected:
friend class MidiTrack;
- int process (nframes_t transport_frame, nframes_t nframes, nframes_t offset, bool can_record, bool rec_monitors_input);
+ int process (nframes_t transport_frame, nframes_t nframes, bool can_record, bool rec_monitors_input);
bool commit (nframes_t nframes);
static nframes_t midi_readahead;
diff --git a/libs/ardour/ardour/midi_port.h b/libs/ardour/ardour/midi_port.h
index f27789da5f..2f3d8d1647 100644
--- a/libs/ardour/ardour/midi_port.h
+++ b/libs/ardour/ardour/midi_port.h
@@ -36,15 +36,16 @@ class MidiPort : public Port {
return DataType::MIDI;
}
- void cycle_start (nframes_t nframes, nframes_t offset);
- void cycle_end (nframes_t nframes, nframes_t offset);
- void flush_buffers (nframes_t nframes, nframes_t offset);
+ void cycle_start (nframes_t nframes);
+ void cycle_end (nframes_t nframes);
+ void cycle_split ();
+ void flush_buffers (nframes_t nframes, nframes_t offset = 0);
- Buffer& get_buffer (nframes_t nframes, nframes_t offset) {
+ Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) {
return get_midi_buffer (nframes, offset);
}
-
- MidiBuffer& get_midi_buffer (nframes_t nframes, nframes_t offset);
+
+ MidiBuffer& get_midi_buffer (nframes_t nframes, nframes_t offset = 0);
protected:
friend class AudioEngine;
@@ -52,9 +53,9 @@ class MidiPort : public Port {
MidiPort (const std::string& name, Flags);
private:
-
MidiBuffer* _buffer;
bool _has_been_mixed_down;
+
};
} // namespace ARDOUR
diff --git a/libs/ardour/ardour/midi_track.h b/libs/ardour/ardour/midi_track.h
index 174ad87823..424b9d2c92 100644
--- a/libs/ardour/ardour/midi_track.h
+++ b/libs/ardour/ardour/midi_track.h
@@ -39,17 +39,17 @@ public:
~MidiTrack ();
int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
+ int declick, bool can_record, bool rec_monitors_input);
int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
+ bool state_changing, bool can_record, bool rec_monitors_input);
int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool can_record, bool rec_monitors_input);
+ bool can_record, bool rec_monitors_input);
void process_output_buffers (BufferSet& bufs,
nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset, bool with_redirects, int declick,
+ nframes_t nframes, bool with_redirects, int declick,
bool meter);
boost::shared_ptr<MidiDiskstream> midi_diskstream() const;
@@ -96,8 +96,7 @@ protected:
int _set_state (const XMLNode&, bool call_base);
private:
- void write_controller_messages(MidiBuffer& buf,
- nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
+ void write_controller_messages(MidiBuffer& buf, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
int set_diskstream (boost::shared_ptr<MidiDiskstream> ds);
void use_new_diskstream ();
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h
index 7bdb33056c..2e7a73561e 100644
--- a/libs/ardour/ardour/panner.h
+++ b/libs/ardour/ardour/panner.h
@@ -218,7 +218,7 @@ class Panner : public Processor
bool is_out_of_place () const { return true; }
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const { return true; };
- void run_out_of_place(BufferSet& src, BufferSet& dest, nframes_t start_frame, nframes_t end_frames, nframes_t nframes, nframes_t offset);
+ void run_out_of_place(BufferSet& src, BufferSet& dest, nframes_t start_frame, nframes_t end_frames, nframes_t nframes);
//void* get_inline_gui() const = 0;
//void* get_full_gui() const = 0;
@@ -301,7 +301,7 @@ class Panner : public Processor
/* disallow copy construction */
Panner (Panner const &);
- void distribute_no_automation(BufferSet& src, BufferSet& dest, nframes_t nframes, nframes_t offset, gain_t gain_coeff);
+ void distribute_no_automation(BufferSet& src, BufferSet& dest, nframes_t nframes, gain_t gain_coeff);
std::vector<StreamPanner*> _streampanners;
uint32_t current_outs;
bool _linked;
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h
index 0d3534a2b8..e3204fc6b3 100644
--- a/libs/ardour/ardour/plugin_insert.h
+++ b/libs/ardour/ardour/plugin_insert.h
@@ -54,7 +54,7 @@ class PluginInsert : public Processor
XMLNode& get_state(void);
int set_state(const XMLNode&);
- void run_in_place (BufferSet& in, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
+ void run_in_place (BufferSet& in, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
void silence (nframes_t nframes, nframes_t offset);
void activate ();
@@ -136,7 +136,7 @@ class PluginInsert : public Processor
BufferSet _signal_analysis_input_bufferset;
BufferSet _signal_analysis_output_bufferset;
- void automation_run (BufferSet& bufs, nframes_t nframes, nframes_t offset);
+ void automation_run (BufferSet& bufs, nframes_t nframes);
void connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now = 0);
void init ();
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h
index cf54c5065b..0c77eb15dd 100644
--- a/libs/ardour/ardour/port.h
+++ b/libs/ardour/ardour/port.h
@@ -44,6 +44,18 @@ public:
virtual ~Port ();
+ static nframes_t port_offset() { return _port_offset; }
+
+ static void set_port_offset (nframes_t off) {
+ _port_offset = off;
+ }
+ static void increment_port_offset (nframes_t n) {
+ _port_offset += n;
+ }
+ static void set_buffer_size (nframes_t sz) {
+ _buffer_size = sz;
+ }
+
/** @return Port short name */
std::string name () const {
return _name;
@@ -91,10 +103,11 @@ public:
virtual void reset ();
virtual DataType type () const = 0;
- virtual void cycle_start (nframes_t, nframes_t) = 0;
- virtual void cycle_end (nframes_t, nframes_t) = 0;
- virtual Buffer& get_buffer (nframes_t, nframes_t) = 0;
- virtual void flush_buffers (nframes_t, nframes_t) {}
+ virtual void cycle_start (nframes_t) = 0;
+ virtual void cycle_end (nframes_t) = 0;
+ virtual void cycle_split () = 0;
+ virtual Buffer& get_buffer (nframes_t nframes, nframes_t offset = 0) = 0;
+ virtual void flush_buffers (nframes_t, nframes_t offset = 0) {}
static void set_engine (AudioEngine *);
@@ -106,6 +119,9 @@ protected:
jack_port_t* _jack_port; ///< JACK port
+ static nframes_t _port_offset;
+ static nframes_t _buffer_size;
+
static AudioEngine* _engine; ///< the AudioEngine
private:
diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h
index dcf2e8dfb2..27d251cc45 100644
--- a/libs/ardour/ardour/port_insert.h
+++ b/libs/ardour/ardour/port_insert.h
@@ -50,7 +50,7 @@ class PortInsert : public IOProcessor
void init ();
- void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
+ void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
nframes_t signal_latency() const;
diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h
index dce55e018e..24d3cd93c7 100644
--- a/libs/ardour/ardour/processor.h
+++ b/libs/ardour/ardour/processor.h
@@ -72,13 +72,13 @@ class Processor : public SessionObject, public AutomatableControls, public Laten
virtual void run_in_place (BufferSet& bufs,
nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset) { assert(is_in_place()); }
+ nframes_t nframes) { assert(is_in_place()); }
virtual void run_out_of_place (BufferSet& input, BufferSet& output,
nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset) { assert(is_out_of_place()); }
+ nframes_t nframes) { assert(is_out_of_place()); }
- virtual void silence (nframes_t nframes, nframes_t offset) {}
+ virtual void silence (nframes_t nframes) {}
void activate () { _active = true; ActiveChanged(); }
void deactivate () { _active = false; ActiveChanged(); }
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 2319cadb57..183be9c4c8 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -91,13 +91,13 @@ class Route : public IO
virtual int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, int declick, bool can_record, bool rec_monitors_input);
+ int declick, bool can_record, bool rec_monitors_input);
virtual int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input);
+ bool state_changing, bool can_record, bool rec_monitors_input);
virtual int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool can_record, bool rec_monitors_input);
+ bool can_record, bool rec_monitors_input);
virtual void toggle_monitor_input ();
virtual bool can_record() { return false; }
@@ -273,16 +273,16 @@ class Route : public IO
void curve_reallocate ();
protected:
- nframes_t check_initial_delay (nframes_t, nframes_t&, nframes_t&);
+ nframes_t check_initial_delay (nframes_t, nframes_t&);
void passthru (nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset, int declick, bool meter_inputs);
+ nframes_t nframes, int declick, bool meter_inputs);
virtual void process_output_buffers (BufferSet& bufs,
- nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset, bool with_processors, int declick,
- bool meter);
-
+ nframes_t start_frame, nframes_t end_frame,
+ nframes_t nframes, bool with_processors, int declick,
+ bool meter);
+
Flag _flags;
int _pending_declick;
MeterPoint _meter_point;
@@ -326,10 +326,10 @@ class Route : public IO
virtual XMLNode& state(bool);
void passthru_silence (nframes_t start_frame, nframes_t end_frame,
- nframes_t nframes, nframes_t offset, int declick,
+ nframes_t nframes, int declick,
bool meter);
- void silence (nframes_t nframes, nframes_t offset);
+ void silence (nframes_t nframes);
sigc::connection input_signal_connection;
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index ed37094bf3..2e7d2c239c 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -43,7 +43,7 @@ class Send : public IOProcessor
ChanCount output_streams() const;
ChanCount input_streams () const;
- void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
+ void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes);
void activate() {}
void deactivate () {}
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index dc43e08a2d..c2e7e23476 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1077,14 +1077,11 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
nframes_t slave_wait_end;
void reset_slave_state ();
- bool follow_slave (nframes_t, nframes_t);
+ bool follow_slave (nframes_t);
void calculate_moving_average_of_slave_delta(int dir, nframes_t this_delta);
- void track_slave_state(
- float slave_speed,
- nframes_t slave_transport_frame,
- nframes_t this_delta,
- bool starting);
- void follow_slave_silently(nframes_t nframes, nframes_t offset, float slave_speed);
+ void track_slave_state(float slave_speed, nframes_t slave_transport_frame,
+ nframes_t this_delta, bool starting);
+ void follow_slave_silently(nframes_t nframes, float slave_speed);
void set_slave_source (SlaveSource);
@@ -1105,8 +1102,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
void prepare_diskstreams ();
void commit_diskstreams (nframes_t, bool& session_requires_butler);
- int process_routes (nframes_t, nframes_t);
- int silent_process_routes (nframes_t, nframes_t);
+ int process_routes (nframes_t);
+ int silent_process_routes (nframes_t);
bool get_rec_monitors_input () {
if (actively_recording()) {
@@ -1140,7 +1137,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
return false;
}
- bool maybe_sync_start (nframes_t&, nframes_t&);
+ bool maybe_sync_start (nframes_t&);
void check_declick_out ();
@@ -1385,7 +1382,8 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
void reset_record_status ();
- int no_roll (nframes_t nframes, nframes_t offset);
+ int no_roll (nframes_t nframes);
+ int fail_roll (nframes_t nframes);
bool non_realtime_work_pending() const { return static_cast<bool>(post_transport_work); }
bool process_can_proceed() const { return !(post_transport_work & ProcessCannotProceedMask); }
@@ -1673,7 +1671,7 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable
Click *get_click();
void setup_click_sounds (int which);
void clear_clicks ();
- void click (nframes_t start, nframes_t nframes, nframes_t offset);
+ void click (nframes_t start, nframes_t nframes);
vector<Route*> master_outs;
diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h
index 42e992c220..29a4aa8e25 100644
--- a/libs/ardour/ardour/track.h
+++ b/libs/ardour/ardour/track.h
@@ -46,13 +46,13 @@ class Track : public Route
sigc::signal<void> TrackModeChanged;
virtual int roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, int declick, bool can_record, bool rec_monitors_input) = 0;
+ int declick, bool can_record, bool rec_monitors_input) = 0;
virtual int no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool state_changing, bool can_record, bool rec_monitors_input) = 0;
+ bool state_changing, bool can_record, bool rec_monitors_input) = 0;
virtual int silent_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
- nframes_t offset, bool can_record, bool rec_monitors_input) = 0;
+ bool can_record, bool rec_monitors_input) = 0;
void toggle_monitor_input ();