};
/** 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,
PluginAutomation,
PluginPropertyAutomation,
SoloAutomation,
+ SoloIsolateAutomation,
+ SoloSafeAutomation,
MuteAutomation,
MidiCCAutomation,
MidiPgmChangeAutomation,
EnvelopeAutomation,
RecEnableAutomation,
TrimAutomation,
+ PhaseAutomation,
+ MonitoringAutomation,
+ EQGain,
+ EQFrequency,
+ EQQ,
+ EQShape,
+ EQHPF,
+ EQEnable,
+ CompThreshold,
+ CompSpeed,
+ CompMode,
+ CompMakeup,
+ CompRedux,
+ CompEnable,
+ BusSendLevel,
+ BusSendEnable,
};
enum AutoState {
MeterIEC2EBU = 0x0200,
MeterVU = 0x0400,
MeterK12 = 0x0800,
- MeterPeak0dB = 0x1000
+ MeterPeak0dB = 0x1000,
+ MeterMCP = 0x2000
};
enum TrackMode {
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;
AutoConnectPhysical = 0x1,
AutoConnectMaster = 0x2
};
-
+
enum TracksAutoNamingRule {
UseDefaultNames = 0x1,
NameAfterDriver = 0x2
CAF,
AIFF,
iXML,
- RF64
+ RF64,
+ RF64_WAV,
+ MBWF,
};
struct PeakData {
this equality cannot be assumed.
*/
TransportStopped = 0,
- TransportRolling = 1,
- TransportLooping = 2,
+ TransportRolling = 1,
+ TransportLooping = 2,
TransportStarting = 3,
};
/* 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,
RegionSelectionStart = 0x8,
};
+ enum PlaylistDisposition {
+ CopyPlaylist,
+ NewPlaylist,
+ SharePlaylist
+ };
+
} // namespace ARDOUR
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" */
#endif /* __ardour_types_h__ */
-