X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Ftypes.h;h=976c4924a794034dd1c143ba5aca9a12044db543;hb=74a604d261b1ecb0f20ee0c69aef7648da3a1d86;hp=ba521f3b71640b083a7fdd198a1840c425636961;hpb=ba981a14c4fb7e6bfe1a7434e81cdecac422c838;p=ardour.git diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index ba521f3b71..976c4924a7 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -52,6 +52,9 @@ namespace ARDOUR { class AudioSource; class Route; class Region; + class Stripable; + class VCA; + class AutomationControl; typedef float Sample; typedef float pan_t; @@ -108,15 +111,22 @@ namespace ARDOUR { */ 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 + 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 + * + * When you add things here, you REALLY SHOULD add a case clause to + * the constructor of ParameterDescriptor, unless the Controllables + * that the enum refers to are completely standard (0-1.0 range, 0.0 as + * normal, non-toggled, non-enumerated). Anything else needs to be + * added there so that things that try to represent them can do so + * with as much information as possible. */ enum AutomationType { NullAutomation, @@ -129,17 +139,37 @@ namespace ARDOUR { PluginAutomation, PluginPropertyAutomation, SoloAutomation, + SoloIsolateAutomation, + SoloSafeAutomation, MuteAutomation, MidiCCAutomation, MidiPgmChangeAutomation, MidiPitchBenderAutomation, MidiChannelPressureAutomation, + MidiNotePressureAutomation, MidiSystemExclusiveAutomation, FadeInAutomation, FadeOutAutomation, EnvelopeAutomation, RecEnableAutomation, + RecSafeAutomation, TrimAutomation, + PhaseAutomation, + MonitoringAutomation, + EQGain, + EQFrequency, + EQQ, + EQShape, + EQHPF, + EQEnable, + CompThreshold, + CompSpeed, + CompMode, + CompMakeup, + CompRedux, + CompEnable, + BusSendLevel, + BusSendEnable, }; enum AutoState { @@ -192,7 +222,8 @@ namespace ARDOUR { MeterIEC2EBU = 0x0200, MeterVU = 0x0400, MeterK12 = 0x0800, - MeterPeak0dB = 0x1000 + MeterPeak0dB = 0x1000, + MeterMCP = 0x2000 }; enum TrackMode { @@ -292,7 +323,7 @@ namespace ARDOUR { AudioRange (framepos_t s, framepos_t e, uint32_t i) : start (s), end (e) , id (i) {} - framecnt_t length() { return end - start + 1; } + framecnt_t length() const { return end - start + 1; } bool operator== (const AudioRange& other) const { return start == other.start && end == other.end && id == other.id; @@ -436,11 +467,6 @@ namespace ARDOUR { DenormalFTZDAZ }; - enum RemoteModel { - UserOrdered, - MixerOrdered - }; - enum LayerModel { LaterHigher, Manual @@ -456,7 +482,7 @@ namespace ARDOUR { AutoConnectPhysical = 0x1, AutoConnectMaster = 0x2 }; - + enum TracksAutoNamingRule { UseDefaultNames = 0x1, NameAfterDriver = 0x2 @@ -484,7 +510,9 @@ namespace ARDOUR { CAF, AIFF, iXML, - RF64 + RF64, + RF64_WAV, + MBWF, }; struct PeakData { @@ -535,7 +563,12 @@ namespace ARDOUR { typedef std::list AnalysisFeatureList; typedef std::list > RouteList; + typedef std::list > StripableList; typedef std::list > WeakRouteList; + typedef std::list > WeakStripableList; + typedef std::list > ControlList; + + typedef std::list > VCAList; class Bundle; typedef std::vector > BundleList; @@ -607,8 +640,8 @@ namespace ARDOUR { this equality cannot be assumed. */ TransportStopped = 0, - TransportRolling = 1, - TransportLooping = 2, + TransportRolling = 1, + TransportLooping = 2, TransportStarting = 3, }; @@ -616,7 +649,7 @@ namespace ARDOUR { /* these values happen to match the constants used by JACK but this equality cannot be assumed. */ - IsInput = 0x1, + IsInput = 0x1, IsOutput = 0x2, IsPhysical = 0x4, CanMonitor = 0x8, @@ -642,6 +675,12 @@ namespace ARDOUR { RegionSelectionStart = 0x8, }; + enum PlaylistDisposition { + CopyPlaylist, + NewPlaylist, + SharePlaylist + }; + } // namespace ARDOUR @@ -656,7 +695,6 @@ std::istream& operator>>(std::istream& o, ARDOUR::EditMode& sf); std::istream& operator>>(std::istream& o, ARDOUR::MonitorModel& sf); std::istream& operator>>(std::istream& o, ARDOUR::PFLPosition& sf); std::istream& operator>>(std::istream& o, ARDOUR::AFLPosition& sf); -std::istream& operator>>(std::istream& o, ARDOUR::RemoteModel& sf); std::istream& operator>>(std::istream& o, ARDOUR::ListenPosition& sf); std::istream& operator>>(std::istream& o, ARDOUR::LayerModel& sf); std::istream& operator>>(std::istream& o, ARDOUR::InsertMergePolicy& sf); @@ -670,6 +708,7 @@ std::istream& operator>>(std::istream& o, ARDOUR::FadeShape& sf); std::istream& operator>>(std::istream& o, ARDOUR::RegionSelectionAfterSplit& sf); std::istream& operator>>(std::istream& o, ARDOUR::BufferingPreset& var); std::istream& operator>>(std::istream& o, ARDOUR::AutoReturnTarget& sf); +std::istream& operator>>(std::istream& o, ARDOUR::MeterType& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::SampleFormat& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::HeaderFormat& sf); @@ -679,7 +718,6 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::EditMode& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::MonitorModel& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::PFLPosition& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::AFLPosition& sf); -std::ostream& operator<<(std::ostream& o, const ARDOUR::RemoteModel& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::ListenPosition& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::LayerModel& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::InsertMergePolicy& sf); @@ -693,6 +731,7 @@ std::ostream& operator<<(std::ostream& o, const ARDOUR::FadeShape& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::RegionSelectionAfterSplit& sf); std::ostream& operator<<(std::ostream& o, const ARDOUR::BufferingPreset& var); std::ostream& operator<<(std::ostream& o, const ARDOUR::AutoReturnTarget& sf); +std::ostream& operator<<(std::ostream& o, const ARDOUR::MeterType& sf); /* because these operators work on types which can be used when making a UI_CONFIG_VARIABLE (in gtk2_ardour) we need them to be exported. @@ -711,13 +750,30 @@ LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::MeterLineU static inline ARDOUR::framepos_t session_frame_to_track_frame (ARDOUR::framepos_t session_frame, double speed) { - return (ARDOUR::framepos_t) ((long double) session_frame * (long double) speed); + long double result = (long double) session_frame * (long double) speed; + + if (result >= (long double) ARDOUR::max_framepos) { + return ARDOUR::max_framepos; + } else if (result <= (long double) (ARDOUR::max_framepos) * (ARDOUR::framepos_t)(-1)) { + return (ARDOUR::max_framepos * (ARDOUR::framepos_t)(-1)); + } else { + return result; + } } static inline ARDOUR::framepos_t track_frame_to_session_frame (ARDOUR::framepos_t track_frame, double speed) { - return (ARDOUR::framepos_t) ((long double) track_frame / (long double) speed); + /* NB - do we need a check for speed == 0 ??? */ + long double result = (long double) track_frame / (long double) speed; + + if (result >= (long double) ARDOUR::max_framepos) { + return ARDOUR::max_framepos; + } else if (result <= (long double) (ARDOUR::max_framepos) * (ARDOUR::framepos_t)(-1)) { + return (ARDOUR::max_framepos * (ARDOUR::framepos_t)(-1)); + } else { + return result; + } } /* for now, break the rules and use "using" to make this "global" */ @@ -726,4 +782,3 @@ using ARDOUR::framepos_t; #endif /* __ardour_types_h__ */ -