- class Source;
- class AudioSource;
- class Route;
- class Region;
-
- typedef float Sample;
- typedef float pan_t;
- typedef float gain_t;
- typedef uint32_t layer_t;
- typedef uint64_t microseconds_t;
- typedef uint32_t pframes_t;
-
- /* Any position measured in audio frames.
- Assumed to be non-negative but not enforced.
- */
- typedef int64_t framepos_t;
-
- /* Any distance from a given framepos_t.
- Maybe positive or negative.
- */
- typedef int64_t frameoffset_t;
-
- /* Any count of audio frames.
- Assumed to be positive but not enforced.
- */
- typedef int64_t framecnt_t;
-
- static const framepos_t max_framepos = INT64_MAX;
- static const framecnt_t max_framecnt = INT64_MAX;
- static const layer_t max_layer = UINT32_MAX;
-
- // a set of (time) intervals: first of pair is the offset of the start within the region, second is the offset of the end
- typedef std::list<std::pair<frameoffset_t, frameoffset_t> > AudioIntervalResult;
- // associate a set of intervals with regions (e.g. for silence detection)
- typedef std::map<boost::shared_ptr<ARDOUR::Region>,AudioIntervalResult> AudioIntervalMap;
-
- typedef std::list<boost::shared_ptr<Region> > RegionList;
-
- struct IOChange {
-
- enum Type {
- NoChange = 0,
- ConfigurationChanged = 0x1,
- ConnectionsChanged = 0x2
- } type;
-
- IOChange () : type (NoChange) {}
- IOChange (Type t) : type (t) {}
-
- /** channel count of IO before a ConfigurationChanged, if appropriate */
- ARDOUR::ChanCount before;
- /** channel count of IO after a ConfigurationChanged, if appropriate */
- ARDOUR::ChanCount after;
- };
-
- /* policies for inserting/pasting material where overlaps
- might be an issue.
- */
-
- enum InsertMergePolicy {
- InsertMergeReject, // no overlaps allowed
- InsertMergeRelax, // we just don't care about overlaps
- InsertMergeReplace, // replace old with new
- InsertMergeTruncateExisting, // shorten existing to avoid overlap
- InsertMergeTruncateAddition, // shorten new to avoid overlap
- InsertMergeExtend // extend new (or old) to the range of old+new
- };
-
- /** See evoral/Parameter.hpp
- */
- enum AutomationType {
- NullAutomation,
- GainAutomation,
- PanAzimuthAutomation,
- PanElevationAutomation,
- PanWidthAutomation,
- PanFrontBackAutomation,
- PanLFEAutomation,
- PluginAutomation,
- SoloAutomation,
- MuteAutomation,
- MidiCCAutomation,
- MidiPgmChangeAutomation,
- MidiPitchBenderAutomation,
- MidiChannelPressureAutomation,
- MidiSystemExclusiveAutomation,
- FadeInAutomation,
- FadeOutAutomation,
- EnvelopeAutomation,
- RecEnableAutomation
- };
-
- enum AutoState {
- Off = 0x0,
- Write = 0x1,
- Touch = 0x2,
- Play = 0x4
- };
-
- std::string auto_state_to_string (AutoState);
- AutoState string_to_auto_state (std::string);
-
- enum AutoStyle {
- Absolute = 0x1,
- Trim = 0x2
- };
-
- std::string auto_style_to_string (AutoStyle);
- AutoStyle string_to_auto_style (std::string);
-
- enum AlignStyle {
- CaptureTime,
- ExistingMaterial
- };
-
- enum AlignChoice {
- UseCaptureTime,
- UseExistingMaterial,
- Automatic
- };
-
- enum MeterPoint {
- MeterInput,
- MeterPreFader,
- MeterPostFader,
- MeterOutput,
- MeterCustom
- };
-
- enum MeterType {
- MeterMaxSignal = 0x001,
- MeterMaxPeak = 0x002,
- MeterPeak = 0x004,
- MeterKrms = 0x008,
- MeterK20 = 0x010,
- MeterK14 = 0x020,
- MeterIEC1DIN = 0x040,
- MeterIEC1NOR = 0x080,
- MeterIEC2BBC = 0x100,
- MeterIEC2EBU = 0x200,
- MeterVU = 0x400,
- MeterK12 = 0x800
- };
-
- enum TrackMode {
- Normal,
- NonLayered,
- Destructive
- };
-
- enum NoteMode {
- Sustained,
- Percussive
- };
-
- enum ChannelMode {
- AllChannels = 0, ///< Pass through all channel information unmodified
- FilterChannels, ///< Ignore events on certain channels
- ForceChannel ///< Force all events to a certain channel
- };
-
- enum ColorMode {
- MeterColors = 0,
- ChannelColors,
- TrackColor
- };
-
- class AnyTime {
- public:
- enum Type {
- Timecode,
- BBT,
- Frames,
- Seconds
- };
-
- Type type;
-
- Timecode::Time timecode;
- Timecode::BBT_Time bbt;
-
- union {
- framecnt_t frames;
- double seconds;
- };
-
- AnyTime() { type = Frames; frames = 0; }
-
- bool operator== (AnyTime const & other) const {
- if (type != other.type) { return false; }
-
- switch (type) {
- case Timecode:
- return timecode == other.timecode;
- case BBT:
- return bbt == other.bbt;
- case Frames:
- return frames == other.frames;
- case Seconds:
- return seconds == other.seconds;
- }
- return false; // get rid of warning
- }
-
- bool not_zero() const
- {
- switch (type) {
- case Timecode:
- return timecode.hours != 0 || timecode.minutes != 0 ||
- timecode.seconds != 0 || timecode.frames != 0;
- case BBT:
- return bbt.bars != 0 || bbt.beats != 0 || bbt.ticks != 0;
- case Frames:
- return frames != 0;
- case Seconds:
- return seconds != 0;
- }
-
- /* NOTREACHED */
- assert (false);
- return false;
- }
- };
-
- /* XXX: slightly unfortunate that there is this and Evoral::Range<>,
- but this has a uint32_t id which Evoral::Range<> does not.
- */
- struct AudioRange {
- framepos_t start;
- framepos_t end;
- uint32_t id;
-
- AudioRange (framepos_t s, framepos_t e, uint32_t i) : start (s), end (e) , id (i) {}
-
- framecnt_t length() { return end - start + 1; }
-
- bool operator== (const AudioRange& other) const {
- return start == other.start && end == other.end && id == other.id;
- }
-
- bool equal (const AudioRange& other) const {
- return start == other.start && end == other.end;
- }
-
- Evoral::OverlapType coverage (framepos_t s, framepos_t e) const {
- return Evoral::coverage (start, end, s, e);
- }
- };
-
- struct MusicRange {
- Timecode::BBT_Time start;
- Timecode::BBT_Time end;
- uint32_t id;
-
- MusicRange (Timecode::BBT_Time& s, Timecode::BBT_Time& e, uint32_t i)
- : start (s), end (e), id (i) {}
+class Source;
+class AudioSource;
+class Route;
+class Region;
+class Stripable;
+class VCA;
+class AutomationControl;
+class SlavableAutomationControl;
+
+typedef float Sample;
+typedef float pan_t;
+typedef float gain_t;
+typedef uint32_t layer_t;
+typedef uint64_t microseconds_t;
+typedef uint32_t pframes_t;
+
+/* rebind Temporal position types into ARDOUR namespace */
+typedef Temporal::samplecnt_t samplecnt_t;
+typedef Temporal::samplepos_t samplepos_t;
+typedef Temporal::sampleoffset_t sampleoffset_t;
+
+static const layer_t max_layer = UINT32_MAX;
+
+// a set of (time) intervals: first of pair is the offset of the start within the region, second is the offset of the end
+typedef std::list<std::pair<sampleoffset_t, sampleoffset_t> > AudioIntervalResult;
+// associate a set of intervals with regions (e.g. for silence detection)
+typedef std::map<boost::shared_ptr<ARDOUR::Region>,AudioIntervalResult> AudioIntervalMap;
+
+typedef std::list<boost::shared_ptr<Region> > RegionList;
+
+struct IOChange {
+
+ enum Type {
+ NoChange = 0,
+ ConfigurationChanged = 0x1,
+ ConnectionsChanged = 0x2
+ } type;
+
+ IOChange () : type (NoChange) {}
+ IOChange (Type t) : type (t) {}
+
+ /** channel count of IO before a ConfigurationChanged, if appropriate */
+ ARDOUR::ChanCount before;
+ /** channel count of IO after a ConfigurationChanged, if appropriate */
+ ARDOUR::ChanCount after;
+};
+
+/* policies for inserting/pasting material where overlaps
+ might be an issue.
+*/