> > const & sort_list)
- {
- parents.sort (NodeSorter (sort_list));
- }
-
- private:
- DataPtr _data;
- WeakSelfPtr _self_ptr;
- };
-
- private:
- /* Sorts GraphNodes according to a list of DataNodes */
-
- template
- class NodeSorter {
- public:
- typedef list > > ListType;
-
- NodeSorter (ListType const & list) : list (list) {}
-
- bool operator() (GraphNode * one, GraphNode * other) // '<' operator
- {
- if (one == other) { return false; } // Strict weak ordering
- for (typename ListType::const_iterator it = list.begin(); it != list.end(); ++it) {
- if (it->get() == one) {
- return true;
- }
- if (it->get() == other) {
- return false;
- }
- }
-
- std::cerr << "Invalid comparison list given to NodeSorter" << std::endl;
-
- abort();
- }
-
- private:
- ListType const & list;
- };
-
-/*** Multiplication management ***/
- public:
-
- typedef DataNode TimespanNode;
- typedef std::shared_ptr TimespanNodePtr;
-
- typedef DataNode ChannelConfigNode;
- typedef std::shared_ptr ChannelConfigNodePtr;
-
- typedef DataNode FormatNode;
- typedef std::shared_ptr FormatNodePtr;
-
- typedef DataNode FilenameNode;
- typedef std::shared_ptr FilenameNodePtr;
-
- struct MultiplicationGraph {
- list timespans;
- list channel_configs;
- list formats;
- list filenames;
- };
-
- MultiplicationGraph const & get_graph () { return graph; }
-
- void split_node (GraphNode * node, float position);
- void remove_node (GraphNode * node);
-
- PBD::Signal GraphChanged;
-
- private:
-
- void purge_graph ();
-
- template
- static void insert_after (list & the_list, T const & position, T const & element);
-
- template
- static void remove_by_element (list & the_list, T const & element);
-
- bool nodes_have_one_common_child (list const & the_list);
- list::const_iterator end_of_common_child_range (list const & the_list, list::const_iterator beginning);
- void split_node_at_position (GraphNode * old_node, GraphNode * new_node, float position);
-
- void split_timespan (TimespanNodePtr node, float position = 0.5);
- void split_channel_config (ChannelConfigNodePtr node, float position = 0.5);
- void split_format (FormatNodePtr node, float position = 0.5);
- void split_filename (FilenameNodePtr node, float position = 0.5);
-
- void duplicate_timespan_children (TimespanNodePtr source, TimespanNodePtr target, GraphNode * insertion_point = 0);
- void duplicate_channel_config_children (ChannelConfigNodePtr source, ChannelConfigNodePtr target, GraphNode * insertion_point = 0);
- void duplicate_format_children (FormatNodePtr source, FormatNodePtr target, GraphNode * insertion_point = 0);
-
- TimespanNodePtr duplicate_timespan_node (TimespanNodePtr node);
- ChannelConfigNodePtr duplicate_channel_config_node (ChannelConfigNodePtr node);
- FormatNodePtr duplicate_format_node (FormatNodePtr node);
- FilenameNodePtr duplicate_filename_node (FilenameNodePtr node);
-
- void remove_timespan (TimespanNodePtr node);
- void remove_channel_config (ChannelConfigNodePtr node);
- void remove_format (FormatNodePtr node);
- void remove_filename (FilenameNodePtr node);
-
- MultiplicationGraph graph;
\ No newline at end of file
diff --git a/libs/ardour/ardour/export_smf_writer.h b/libs/ardour/ardour/export_smf_writer.h
index 9d86d1b832..e3d5fdd3bd 100644
--- a/libs/ardour/ardour/export_smf_writer.h
+++ b/libs/ardour/ardour/export_smf_writer.h
@@ -25,6 +25,8 @@
#include "ardour/midi_state_tracker.h"
#include "ardour/types.h"
+#include
+
namespace ARDOUR
{
class MidiBuffer;
@@ -36,6 +38,7 @@ public:
~ExportSMFWriter ();
int init (std::string const& path, samplepos_t);
+ Temporal::Beats duration() const;
void process (MidiBuffer const&, sampleoffset_t, samplecnt_t, bool);
diff --git a/libs/ardour/ardour/library.h b/libs/ardour/ardour/library.h
index e24aafd7d2..23f79fa461 100644
--- a/libs/ardour/ardour/library.h
+++ b/libs/ardour/ardour/library.h
@@ -20,6 +20,7 @@
#include
#include
+#include
#include
#include
diff --git a/libs/ardour/ardour/logcurve.h b/libs/ardour/ardour/logcurve.h
index bfab98533f..d64ee0d78e 100644
--- a/libs/ardour/ardour/logcurve.h
+++ b/libs/ardour/ardour/logcurve.h
@@ -23,6 +23,10 @@
#include "pbd/fastlog.h"
#include
+#include "ardour/libardour_visibility.h"
+
+#include
+
namespace ARDOUR {
class LIBARDOUR_API LogCurve {
diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h
index 1da9061a0e..7287c3dc35 100644
--- a/libs/ardour/ardour/midi_playlist.h
+++ b/libs/ardour/ardour/midi_playlist.h
@@ -44,7 +44,6 @@ class Beats;
namespace ARDOUR
{
-class BeatsSamplesConverter;
class MidiChannelFilter;
class MidiRegion;
class Session;
diff --git a/libs/ardour/ardour/midi_scene_changer.h b/libs/ardour/ardour/midi_scene_changer.h
index f7ff8f424c..27eb489254 100644
--- a/libs/ardour/ardour/midi_scene_changer.h
+++ b/libs/ardour/ardour/midi_scene_changer.h
@@ -21,6 +21,7 @@
#include
+#include "ardour/midi_port.h"
#include "ardour/scene_changer.h"
namespace ARDOUR
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h
index b00a16574b..6f5725cc85 100644
--- a/libs/ardour/ardour/midi_source.h
+++ b/libs/ardour/ardour/midi_source.h
@@ -138,7 +138,7 @@ class LIBARDOUR_API MidiSource : virtual public Source
virtual void mark_streaming_midi_write_started (const WriterLock& lock, NoteMode mode);
virtual void mark_streaming_write_started (const WriterLock& lock);
- virtual void mark_streaming_write_completed (const WriterLock& lock);
+ virtual void mark_streaming_write_completed (const WriterLock& lock, Temporal::timecnt_t const & duration);
/** Mark write starting with the given time parameters.
*
@@ -160,7 +160,7 @@ class LIBARDOUR_API MidiSource : virtual public Source
virtual void mark_midi_streaming_write_completed (
const WriterLock& lock,
Evoral::Sequence::StuckNoteOption stuck_option,
- Temporal::Beats when = Temporal::Beats());
+ Temporal::timecnt_t const & when);
virtual void session_saved();
diff --git a/libs/ardour/ardour/midi_ui.h b/libs/ardour/ardour/midi_ui.h
index 2d0885aa8e..dcc55e02be 100644
--- a/libs/ardour/ardour/midi_ui.h
+++ b/libs/ardour/ardour/midi_ui.h
@@ -25,6 +25,8 @@
#include "pbd/abstract_ui.h"
#include "pbd/signals.h"
+#include "ardour/libardour_visibility.h"
+
namespace ARDOUR {
class Session;
diff --git a/libs/ardour/ardour/mixer_scene.h b/libs/ardour/ardour/mixer_scene.h
index 8341f6cb83..eb5038c6f5 100644
--- a/libs/ardour/ardour/mixer_scene.h
+++ b/libs/ardour/ardour/mixer_scene.h
@@ -19,16 +19,13 @@
#ifndef _libardour_mixer_scene_h_
#define _libardour_mixer_scene_h_
+#include "pbd/controllable.h"
#include "pbd/stateful.h"
#include "ardour/libardour_visibility.h"
#include "ardour/session_handle.h"
#include "ardour/types.h"
-namespace PBD {
- class Controllable;
-}
-
namespace ARDOUR {
class LIBARDOUR_API MixerScene : public SessionHandleRef, public PBD::Stateful
diff --git a/libs/ardour/ardour/monitor_port.h b/libs/ardour/ardour/monitor_port.h
index 2d8c6c42f7..9cc3176941 100644
--- a/libs/ardour/ardour/monitor_port.h
+++ b/libs/ardour/ardour/monitor_port.h
@@ -25,6 +25,7 @@
#include "zita-resampler/vmresampler.h"
#include "pbd/rcu.h"
+#include
#include "ardour/audio_buffer.h"
#include "ardour/port_engine.h"
diff --git a/libs/ardour/ardour/movable.h b/libs/ardour/ardour/movable.h
index 64ad637f2d..d4fe89a7e6 100644
--- a/libs/ardour/ardour/movable.h
+++ b/libs/ardour/ardour/movable.h
@@ -18,6 +18,8 @@
#pragma once
+#include "ardour/libardour_visibility.h"
+
namespace ARDOUR {
class LIBARDOUR_API Movable {
diff --git a/libs/ardour/ardour/panner_shell.h b/libs/ardour/ardour/panner_shell.h
index 250656679e..74df576544 100644
--- a/libs/ardour/ardour/panner_shell.h
+++ b/libs/ardour/ardour/panner_shell.h
@@ -26,7 +26,9 @@
#include
#include
+#include "evoral/Parameter.h"
#include "pbd/cartesian.h"
+#include "temporal/domain_provider.h"
#include "ardour/libardour_visibility.h"
#include "ardour/types.h"
diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h
index 47668177e2..26b86b7cd0 100644
--- a/libs/ardour/ardour/peak.h
+++ b/libs/ardour/ardour/peak.h
@@ -28,7 +28,7 @@ static inline float
default_compute_peak (const ARDOUR::Sample * const buf, ARDOUR::pframes_t nsamples, float current)
{
for (ARDOUR::pframes_t i = 0; i < nsamples; ++i) {
- current = f_max (current, fabsf (buf[i]));
+ current = ARDOUR::f_max (current, fabsf (buf[i]));
}
return current;
}
diff --git a/libs/ardour/ardour/proxy_controllable.h b/libs/ardour/ardour/proxy_controllable.h
index 61137ae0ab..c6e61dd1e9 100644
--- a/libs/ardour/ardour/proxy_controllable.h
+++ b/libs/ardour/ardour/proxy_controllable.h
@@ -23,6 +23,8 @@
#include
#include "pbd/controllable.h"
+
+#include "ardour/dB.h"
#include "ardour/libardour_visibility.h"
namespace ARDOUR {
diff --git a/libs/ardour/ardour/rc_configuration.h b/libs/ardour/ardour/rc_configuration.h
index 2fcfa58c62..b35ca5f6c1 100644
--- a/libs/ardour/ardour/rc_configuration.h
+++ b/libs/ardour/ardour/rc_configuration.h
@@ -71,7 +71,7 @@ class LIBARDOUR_API RCConfiguration : public PBD::Configuration
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
-#include "ardour/rc_configuration_vars.h"
+#include "ardour/rc_configuration_vars.inc.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
@@ -83,7 +83,7 @@ class LIBARDOUR_API RCConfiguration : public PBD::Configuration
#undef CONFIG_VARIABLE_SPECIAL
#define CONFIG_VARIABLE(Type,var,name,value) PBD::ConfigVariable var;
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) PBD::ConfigVariableWithMutation var;
-#include "ardour/rc_configuration_vars.h"
+#include "ardour/rc_configuration_vars.inc.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.inc.h
similarity index 98%
rename from libs/ardour/ardour/rc_configuration_vars.h
rename to libs/ardour/ardour/rc_configuration_vars.inc.h
index 5cd5b976d5..b3b2bdb601 100644
--- a/libs/ardour/ardour/rc_configuration_vars.h
+++ b/libs/ardour/ardour/rc_configuration_vars.inc.h
@@ -89,8 +89,7 @@ CONFIG_VARIABLE (float, ltc_output_volume, "ltc-output-volume", 0.125893)
/* control surfaces */
-CONFIG_VARIABLE (uint32_t, feedback_interval_ms, "feedback-interval-ms", 100)
-CONFIG_VARIABLE (bool, use_tranzport, "use-tranzport", false)
+CONFIG_VARIABLE (uint32_t, feedback_interval_ms, "feedback-interval-ms", 100)
CONFIG_VARIABLE (bool, auto_enable_surfaces, "auto-enable-surfaces", true)
/* disk operations */
@@ -184,6 +183,7 @@ CONFIG_VARIABLE (AutoReturnTarget, auto_return_target_list, "auto-return-target-
CONFIG_VARIABLE (bool, reset_default_speed_on_stop, "reset-default-speed-on-stop", false)
CONFIG_VARIABLE (bool, rewind_ffwd_like_tape_decks, "rewind-ffwd-like-tape-decks", true)
CONFIG_VARIABLE (bool, auto_return_after_rewind_ffwd, "auto-return-after-rewind-ffwd", false)
+CONFIG_VARIABLE (bool, stop_on_grid, "stop-on-grid", false)
/* metering */
@@ -236,7 +236,7 @@ CONFIG_VARIABLE (samplecnt_t, range_location_minimum, "range-location-minimum",
CONFIG_VARIABLE (EditMode, edit_mode, "edit-mode", Slide)
CONFIG_VARIABLE (RippleMode, ripple_mode, "ripple-mode", RippleSelected)
CONFIG_VARIABLE (Temporal::TimeDomain, default_automation_time_domain, "default-automation-time-domain", Temporal::BeatTime)
-
+CONFIG_VARIABLE (ARDOUR::AnyTime, default_quantization, "default-quantization", ARDOUR::AnyTime (Temporal::BBT_Offset (1, 0, 0)))
CONFIG_VARIABLE (bool, mark_at_pgm_change, "mark-at-pgm-change", true)
CONFIG_VARIABLE (bool, locate_to_pgm_change, "locate-to-pgm-change", true)
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index fc76cfb529..a465cf0927 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1367,6 +1367,11 @@ public:
void unsuspend_livetrax_auto_connect (bool with_action);
void update_track_numbers () { reassign_track_numbers (); }
+ AnyTime global_quantization() const { return _global_quantization; }
+ void set_global_quantization (AnyTime const &);
+ PBD::Signal QuantizationChanged;
+
+
protected:
friend class AudioEngine;
void set_block_size (pframes_t nframes);
@@ -2011,7 +2016,7 @@ public:
ARDOUR::CueMarkers pending_source_markers; // source markers created while recording
private:
- void reset_write_sources (bool mark_write_complete, bool force = false);
+ void reset_write_sources (bool mark_write_complete);
SourceMap sources;
int load_sources (const XMLNode& node);
@@ -2399,6 +2404,8 @@ private:
std::atomic _no_livetrax_auto_connect;
std::map livetrax_vs_msend_values;
+
+ AnyTime _global_quantization;
};
diff --git a/libs/ardour/ardour/session_configuration.h b/libs/ardour/ardour/session_configuration.h
index 88474b6114..d592234390 100644
--- a/libs/ardour/ardour/session_configuration.h
+++ b/libs/ardour/ardour/session_configuration.h
@@ -53,7 +53,7 @@ public:
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
Type get_##var () const { return var.get(); } \
bool set_##var (Type val) { bool ret = var.set (val); if (ret) { ParameterChanged (name); } return ret; }
-#include "ardour/session_configuration_vars.h"
+#include "ardour/session_configuration_vars.inc.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
/* clang-format on */
@@ -67,7 +67,7 @@ public:
#undef CONFIG_VARIABLE_SPECIAL
#define CONFIG_VARIABLE(Type,var,name,value) PBD::ConfigVariable var;
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) PBD::ConfigVariableWithMutation var;
-#include "ardour/session_configuration_vars.h"
+#include "ardour/session_configuration_vars.inc.h"
#undef CONFIG_VARIABLE
#undef CONFIG_VARIABLE_SPECIAL
/* clang-format on */
diff --git a/libs/ardour/ardour/session_configuration_vars.h b/libs/ardour/ardour/session_configuration_vars.inc.h
similarity index 100%
rename from libs/ardour/ardour/session_configuration_vars.h
rename to libs/ardour/ardour/session_configuration_vars.inc.h
diff --git a/libs/ardour/ardour/session_playlists.h b/libs/ardour/ardour/session_playlists.h
index 1ee1faddd3..8045e4fe0e 100644
--- a/libs/ardour/ardour/session_playlists.h
+++ b/libs/ardour/ardour/session_playlists.h
@@ -27,6 +27,10 @@
#include
+#include "ardour/libardour_visibility.h"
+#include "ardour/types.h"
+
+#include "temporal/domain_swap.h"
#include "pbd/signals.h"
diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h
index 07ecb2c53a..b40aab9dd8 100644
--- a/libs/ardour/ardour/smf_source.h
+++ b/libs/ardour/ardour/smf_source.h
@@ -58,10 +58,11 @@ public:
void update_length (timepos_t const & dur);
void mark_streaming_midi_write_started (const WriterLock& lock, NoteMode mode);
- void mark_streaming_write_completed (const WriterLock& lock);
+
+ void mark_streaming_write_completed (const WriterLock& lock, Temporal::timecnt_t const & duration);
void mark_midi_streaming_write_completed (const WriterLock& lock,
Evoral::Sequence::StuckNoteOption,
- Temporal::Beats when = Temporal::Beats());
+ Temporal::timecnt_t const & duration);
XMLNode& get_state () const;
int set_state (const XMLNode&, int version);
@@ -80,6 +81,8 @@ public:
void render (const ReaderLock& lock, Evoral::EventSink& dst);
+ Temporal::Beats duration() const;
+
protected:
void close ();
void flush_midi (const WriterLock& lock);
diff --git a/libs/ardour/ardour/soundseq.h b/libs/ardour/ardour/soundseq.h
deleted file mode 100644
index 2cf8bcc866..0000000000
--- a/libs/ardour/ardour/soundseq.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2007-2017 Paul Davis
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#pragma once
-
-#include "edl.h"
-
-namespace ARDOUR {
-
-typedef gint16 peak_datum;
-
-struct LIBARDOUR_API peak_data_t {
- peak_datum min;
- peak_datum max;
-};
-
-const uint32_t samples_per_peak = 2048;
-
-class LIBARDOUR_API Sound : public EDL::Piece {
- public:
- int peak (peak_data_t& pk, uint32_t start, uint32_t cnt);
- int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt);
- int build_peak (uint32_t first_sample, uint32_t cnt);
-};
-
-class LIBARDOUR_API SoundPlaylist : public EDL::Playlist {
- public:
- int read_peaks (peak_data_t *, uint32_t npeaks, uint32_t start, uint32_t cnt);
-};
-
-} /* namespace ARDOUR */
-
-
-
-
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h
index 087dbb861c..1770e70ad9 100644
--- a/libs/ardour/ardour/source.h
+++ b/libs/ardour/ardour/source.h
@@ -83,7 +83,12 @@ public:
void mark_for_remove();
virtual void mark_streaming_write_started (const WriterLock& lock) {}
- virtual void mark_streaming_write_completed (const WriterLock& lock) = 0;
+ /* The duration argument is ignored for audio data, where length is
+ implicitly given by the sample data. It matters for MIDI data, where
+ the file may be intended to be N bars long, but has no events that
+ occur at that duration.
+ */
+ virtual void mark_streaming_write_completed (const WriterLock& lock, Temporal::timecnt_t const & duration) = 0;
virtual void session_saved() {}
diff --git a/libs/ardour/ardour/spline.h b/libs/ardour/ardour/spline.h
index c0f02180b7..47a80ad036 100644
--- a/libs/ardour/ardour/spline.h
+++ b/libs/ardour/ardour/spline.h
@@ -19,6 +19,10 @@
#pragma once
+#include "ardour/libardour_visibility.h"
+
+#include
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/libs/ardour/ardour/step_sequencer.h b/libs/ardour/ardour/step_sequencer.h
index 9063a45e27..533f71021c 100644
--- a/libs/ardour/ardour/step_sequencer.h
+++ b/libs/ardour/ardour/step_sequencer.h
@@ -22,6 +22,7 @@
#include
#include
+#include
#include
@@ -38,6 +39,8 @@
#include "ardour/midi_state_tracker.h"
#include "ardour/types.h"
+#include "midi++/types.h"
+
namespace ARDOUR {
class MidiBuffer;
@@ -299,7 +302,7 @@ class StepSequencer : public PBD::Stateful
size_t start_step;
size_t end_step;
- static MultiAllocSingleReleasePool pool;
+ static PBD::MultiAllocSingleReleasePool pool;
void *operator new (size_t) {
return pool.alloc ();
@@ -322,7 +325,7 @@ class StepSequencer : public PBD::Stateful
Temporal::Beats when;
uint8_t buf[3];
- static Pool pool;
+ static PBD::Pool pool;
void *operator new (size_t) {
return pool.alloc ();
diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h
index 650b910cb7..855a78f841 100644
--- a/libs/ardour/ardour/track.h
+++ b/libs/ardour/ardour/track.h
@@ -145,7 +145,7 @@ public:
void ensure_input_monitoring (bool);
std::list > & last_capture_sources ();
std::string steal_write_source_name ();
- void reset_write_sources (bool, bool force = false);
+ void reset_write_sources (bool mark_write_complete);
float playback_buffer_load () const;
float capture_buffer_load () const;
int do_refill ();
diff --git a/libs/ardour/ardour/transport_fsm.h b/libs/ardour/ardour/transport_fsm.h
index 94b660f59f..9dc2c2cac9 100644
--- a/libs/ardour/ardour/transport_fsm.h
+++ b/libs/ardour/ardour/transport_fsm.h
@@ -12,6 +12,7 @@
#include
#include "pbd/demangle.h"
+#include "pbd/pool.h"
#include "ardour/debug.h"
#include "ardour/types.h"
diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h
index ee01cce0db..c3d9b2fc5a 100644
--- a/libs/ardour/ardour/triggerbox.h
+++ b/libs/ardour/ardour/triggerbox.h
@@ -72,7 +72,7 @@ class Session;
class AudioRegion;
class MidiRegion;
class TriggerBox;
-class SlotArmInfo;
+struct SlotArmInfo;
class SideChain;
class MidiPort;
@@ -715,7 +715,7 @@ class LIBARDOUR_API TriggerBoxThread
void set_region (TriggerBox&, uint32_t slot, std::shared_ptr);
void request_delete_trigger (Trigger* t);
- void request_build_source (Trigger* t);
+ void request_build_source (Trigger* t, Temporal::timecnt_t const & duration);
void summon();
void stop();
@@ -743,6 +743,7 @@ class LIBARDOUR_API TriggerBoxThread
std::shared_ptr region;
/* for DeleteTrigger and BuildSourceAndRegion */
Trigger* trigger;
+ Temporal::timecnt_t duration;
void* operator new (size_t);
void operator delete (void* ptr, size_t);
@@ -757,9 +758,9 @@ class LIBARDOUR_API TriggerBoxThread
CrossThreadChannel _xthread;
void queue_request (Request*);
void delete_trigger (Trigger*);
- void build_source (Trigger*);
- void build_midi_source (MIDITrigger*);
- void build_audio_source (AudioTrigger*);
+ void build_source (Trigger*, Temporal::timecnt_t const & duration);
+ void build_midi_source (MIDITrigger*, Temporal::timecnt_t const &);
+ void build_audio_source (AudioTrigger*, Temporal::timecnt_t const &);
};
struct CueRecord {
@@ -783,7 +784,7 @@ struct SlotArmInfo {
samplepos_t start_samples;
Temporal::Beats end_beats;
samplepos_t end_samples;
- Temporal::timecnt_t captured;
+ samplecnt_t captured;
RTMidiBufferBeats* midi_buf;
AudioTrigger::AudioData audio_buf;
RubberBand::RubberBandStretcher* stretcher;
@@ -814,6 +815,7 @@ class LIBARDOUR_API TriggerBox : public Processor, public std::enable_shared_fro
void arm_from_another_thread (Trigger& slot, samplepos_t, uint32_t chans);
void disarm();
+ void disarm_all();
bool armed() const { return (bool) _arm_info.load(); }
PBD::Signal ArmedChanged;
@@ -941,7 +943,7 @@ class LIBARDOUR_API TriggerBox : public Processor, public std::enable_shared_fro
void dump (std::ostream &) const;
- PBD::Signal Captured;
+ PBD::Signal Captured;
private:
struct Requests {
@@ -1099,6 +1101,7 @@ namespace Properties {
LIBARDOUR_API extern PBD::PropertyDescriptor patch_change; /* type not important */
LIBARDOUR_API extern PBD::PropertyDescriptor channel_map; /* type not important */
LIBARDOUR_API extern PBD::PropertyDescriptor used_channels; /* type not important */
+ LIBARDOUR_API extern PBD::PropertyDescriptor region; /* type not important */
LIBARDOUR_API extern PBD::PropertyDescriptor tempo_meter; /* only used to transmit changes, not storage */
}
diff --git a/libs/ardour/ardour/trimmable.h b/libs/ardour/ardour/trimmable.h
index 357f812277..f2c7601a2b 100644
--- a/libs/ardour/ardour/trimmable.h
+++ b/libs/ardour/ardour/trimmable.h
@@ -18,6 +18,8 @@
#pragma once
+#include "ardour/libardour_visibility.h"
+
namespace ARDOUR {
class LIBARDOUR_API Trimmable {
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 3083fd1290..c755727fcd 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -304,6 +304,7 @@ class AnyTime {
enum Type {
Timecode,
BBT,
+ BBT_Offset,
Samples,
Seconds
};
@@ -311,14 +312,21 @@ class AnyTime {
Type type;
Timecode::Time timecode;
- Temporal::BBT_Time bbt;
+ union {
+ Temporal::BBT_Time bbt;
+ Temporal::BBT_Offset bbt_offset;
+ };
union {
samplecnt_t samples;
double seconds;
};
- AnyTime() { type = Samples; samples = 0; }
+ AnyTime () : type (Samples), samples (0) {}
+ AnyTime (Temporal::BBT_Offset bt) : type (BBT_Offset), bbt_offset (bt) {}
+ AnyTime (std::string const &);
+
+ std::string str() const;
bool operator== (AnyTime const & other) const {
if (type != other.type) { return false; }
@@ -328,6 +336,8 @@ class AnyTime {
return timecode == other.timecode;
case BBT:
return bbt == other.bbt;
+ case BBT_Offset:
+ return bbt_offset == other.bbt_offset;
case Samples:
return samples == other.samples;
case Seconds:
@@ -344,6 +354,8 @@ class AnyTime {
timecode.seconds != 0 || timecode.frames != 0;
case BBT:
return bbt.bars != 0 || bbt.beats != 0 || bbt.ticks != 0;
+ case BBT_Offset:
+ return bbt_offset.bars != 0 || bbt_offset.beats != 0 || bbt_offset.ticks != 0;
case Samples:
return samples != 0;
case Seconds:
diff --git a/libs/ardour/ardour/types_convert.h b/libs/ardour/ardour/types_convert.h
index 19b8484589..75f69c199f 100644
--- a/libs/ardour/ardour/types_convert.h
+++ b/libs/ardour/ardour/types_convert.h
@@ -94,6 +94,32 @@ DEFINE_ENUM_CONVERT(ARDOUR::CueBehavior)
DEFINE_ENUM_CONVERT(MusicalMode::Type)
+template <>
+inline bool to_string (ARDOUR::AnyTime const & at, std::string & str)
+{
+ str = at.str();
+ return true;
+}
+
+template <>
+inline bool string_to (std::string const & str, ARDOUR::AnyTime & at)
+{
+ at = ARDOUR::AnyTime (str);
+ return true;
+}
+
+template <>
+inline std::string to_string (ARDOUR::AnyTime at)
+{
+ return at.str();
+}
+
+template <>
+inline ARDOUR::AnyTime string_to (std::string const & str)
+{
+ return ARDOUR::AnyTime (str);
+}
+
template <>
inline std::string to_string (ARDOUR::timepos_t val)
{
diff --git a/libs/ardour/ardour/vst3_scan.h b/libs/ardour/ardour/vst3_scan.h
index 0bd842cc2e..d3dc68964e 100644
--- a/libs/ardour/ardour/vst3_scan.h
+++ b/libs/ardour/ardour/vst3_scan.h
@@ -19,6 +19,7 @@
#ifndef _ardour_vst3_scan_h_
#define _ardour_vst3_scan_h_
+#include
#include
#include
#include
diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc
index c3e83bfa13..e1c68d6852 100644
--- a/libs/ardour/audiofilesource.cc
+++ b/libs/ardour/audiofilesource.cc
@@ -249,13 +249,13 @@ AudioFileSource::set_state (const XMLNode& node, int version)
}
void
-AudioFileSource::mark_streaming_write_completed (const WriterLock& lock)
+AudioFileSource::mark_streaming_write_completed (const WriterLock& lock, Temporal::timecnt_t const & duration)
{
if (!writable()) {
return;
}
- AudioSource::mark_streaming_write_completed (lock);
+ AudioSource::mark_streaming_write_completed (lock, duration);
}
int
diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc
index 970854610b..795debc390 100644
--- a/libs/ardour/audiosource.cc
+++ b/libs/ardour/audiosource.cc
@@ -932,6 +932,7 @@ AudioSource::compute_and_write_peaks (Sample const * buf, samplecnt_t first_samp
samplecnt_t samples_done;
const size_t blocksize = (128 * 1024);
off_t first_peak_byte;
+ std::unique_ptr buf2;
if (-1 == _peakfile_fd) {
if (prepare_for_peakfile_writes ()) {
@@ -991,7 +992,7 @@ AudioSource::compute_and_write_peaks (Sample const * buf, samplecnt_t first_samp
/* make a new contiguous buffer containing leftovers and the new stuff */
to_do = cnt + peak_leftover_cnt;
- std::unique_ptr