X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fenums.cc;h=be468c2534990f897b25e2b6f73bbf0abaf70801;hb=3b7cb8275a447773b48bea093bdc801c3f484ad6;hp=7a200ee0a037db6f3dd72f791695d5fb5dcb9a90;hpb=23e7cf10191270d70357ccf0ed9294f020c7b7ab;p=ardour.git diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 7a200ee0a0..be468c2534 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -32,8 +32,10 @@ #include "ardour/location.h" #include "ardour/midi_model.h" #include "ardour/mute_master.h" +#include "ardour/presentation_info.h" #include "ardour/session.h" #include "ardour/source.h" +#include "ardour/tempo.h" #include "ardour/track.h" #include "ardour/types.h" @@ -72,8 +74,8 @@ setup_enum_writer () MonitorState _MonitorState; PFLPosition _PFLPosition; AFLPosition _AFLPosition; - RemoteModel _RemoteModel; DenormalModel _DenormalModel; + LayerModel _LayerModel; InsertMergePolicy _InsertMergePolicy; ListenPosition _ListenPosition; SampleFormat _SampleFormat; @@ -85,20 +87,23 @@ setup_enum_writer () ShuttleUnits _ShuttleUnits; Session::RecordState _Session_RecordState; SessionEvent::Type _SessionEvent_Type; + SessionEvent::Action _SessionEvent_Action; TimecodeFormat _Session_TimecodeFormat; Session::PullupFormat _Session_PullupFormat; FadeShape _FadeShape; + RegionSelectionAfterSplit _RegionSelectionAfterSplit; IOChange _IOChange; AutomationType _AutomationType; AutoState _AutoState; AutoStyle _AutoStyle; AutoConnectOption _AutoConnectOption; + TracksAutoNamingRule _TracksAutoNamingRule; Session::StateOfTheState _Session_StateOfTheState; - Route::Flag _Route_Flag; Source::Flag _Source_Flag; Diskstream::Flag _Diskstream_Flag; Location::Flags _Location_Flags; PositionLockStyle _PositionLockStyle; + TempoSection::Type _TempoSection_Type; Track::FreezeState _Track_FreezeState; AutomationList::InterpolationStyle _AutomationList_InterpolationStyle; AnyTime::Type _AnyTime_Type; @@ -126,24 +131,57 @@ setup_enum_writer () Session::SlaveState _Session_SlaveState; MTC_Status _MIDI_MTC_Status; Evoral::OverlapType _OverlapType; + BufferingPreset _BufferingPreset; + AutoReturnTarget _AutoReturnTarget; + PresentationInfo::Flag _PresentationInfo_Flag; #define REGISTER(e) enum_writer.register_distinct (typeid(e).name(), i, s); i.clear(); s.clear() #define REGISTER_BITS(e) enum_writer.register_bits (typeid(e).name(), i, s); i.clear(); s.clear() #define REGISTER_ENUM(e) i.push_back (e); s.push_back (#e) #define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e) + REGISTER_ENUM (NullAutomation); REGISTER_ENUM (GainAutomation); REGISTER_ENUM (PanAzimuthAutomation); REGISTER_ENUM (PanElevationAutomation); REGISTER_ENUM (PanWidthAutomation); + REGISTER_ENUM (PanFrontBackAutomation); + REGISTER_ENUM (PanLFEAutomation); REGISTER_ENUM (PluginAutomation); + REGISTER_ENUM (PluginPropertyAutomation); REGISTER_ENUM (SoloAutomation); + REGISTER_ENUM (SoloIsolateAutomation); + REGISTER_ENUM (SoloSafeAutomation); REGISTER_ENUM (MuteAutomation); REGISTER_ENUM (MidiCCAutomation); + REGISTER_ENUM (MidiPgmChangeAutomation); + REGISTER_ENUM (MidiPitchBenderAutomation); + REGISTER_ENUM (MidiChannelPressureAutomation); + REGISTER_ENUM (MidiNotePressureAutomation); + REGISTER_ENUM (MidiSystemExclusiveAutomation); REGISTER_ENUM (FadeInAutomation); REGISTER_ENUM (FadeOutAutomation); REGISTER_ENUM (EnvelopeAutomation); - REGISTER_BITS (_AutomationType); + REGISTER_ENUM (RecEnableAutomation); + REGISTER_ENUM (RecSafeAutomation); + REGISTER_ENUM (TrimAutomation); + REGISTER_ENUM (PhaseAutomation); + REGISTER_ENUM (MonitoringAutomation); + REGISTER_ENUM (EQGain); + REGISTER_ENUM (EQFrequency); + REGISTER_ENUM (EQQ); + REGISTER_ENUM (EQShape); + REGISTER_ENUM (EQHPF); + REGISTER_ENUM (EQEnable); + REGISTER_ENUM (CompThreshold); + REGISTER_ENUM (CompSpeed); + REGISTER_ENUM (CompMode); + REGISTER_ENUM (CompMakeup); + REGISTER_ENUM (CompRedux); + REGISTER_ENUM (CompEnable); + REGISTER_ENUM (BusSendLevel); + REGISTER_ENUM (BusSendEnable); + REGISTER (_AutomationType); REGISTER_ENUM (Off); REGISTER_ENUM (Write); @@ -183,6 +221,8 @@ setup_enum_writer () REGISTER_ENUM (MeterIEC2BBC); REGISTER_ENUM (MeterIEC2EBU); REGISTER_ENUM (MeterVU); + REGISTER_ENUM (MeterPeak0dB); + REGISTER_ENUM (MeterMCP); REGISTER (_MeterType); REGISTER_ENUM (Normal); @@ -235,8 +275,14 @@ setup_enum_writer () REGISTER_ENUM (Slide); REGISTER_ENUM (Splice); + REGISTER_ENUM (Ripple); // XXX do the old enum values have to stay in order? REGISTER_ENUM (Lock); REGISTER (_EditMode); + /* + * Splice mode is undefined, undocumented, and basically fubar'ed + * perhaps someday we will make it work. but for now, avoid it + */ + enum_writer.add_to_hack_table ("Splice", "Slide"); REGISTER_ENUM (Start); REGISTER_ENUM (End); @@ -277,23 +323,24 @@ setup_enum_writer () REGISTER_ENUM (DenormalFTZDAZ); REGISTER (_DenormalModel); - REGISTER_ENUM (UserOrdered); - REGISTER_ENUM (MixerOrdered); - REGISTER (_RemoteModel); /* * EditorOrdered has been deprecated - * since the removal of independent + * since the removal of independent * editor / mixer ordering. */ enum_writer.add_to_hack_table ("EditorOrdered", "MixerOrdered"); - REGISTER_ENUM (InsertMergeReject); - REGISTER_ENUM (InsertMergeRelax); - REGISTER_ENUM (InsertMergeReplace); - REGISTER_ENUM (InsertMergeTruncateExisting); - REGISTER_ENUM (InsertMergeTruncateAddition); - REGISTER_ENUM (InsertMergeExtend); - REGISTER (_InsertMergePolicy); + REGISTER_ENUM (LaterHigher); + REGISTER_ENUM (Manual); + REGISTER (_LayerModel); + + REGISTER_ENUM (InsertMergeReject); + REGISTER_ENUM (InsertMergeRelax); + REGISTER_ENUM (InsertMergeReplace); + REGISTER_ENUM (InsertMergeTruncateExisting); + REGISTER_ENUM (InsertMergeTruncateAddition); + REGISTER_ENUM (InsertMergeExtend); + REGISTER (_InsertMergePolicy); REGISTER_ENUM (AfterFaderListen); REGISTER_ENUM (PreFaderListen); @@ -303,6 +350,10 @@ setup_enum_writer () REGISTER_ENUM (AutoConnectMaster); REGISTER_BITS (_AutoConnectOption); + REGISTER_ENUM (UseDefaultNames); + REGISTER_ENUM (NameAfterDriver); + REGISTER_BITS (_TracksAutoNamingRule); + REGISTER_ENUM (FormatFloat); REGISTER_ENUM (FormatInt24); REGISTER_ENUM (FormatInt16); @@ -320,6 +371,8 @@ setup_enum_writer () REGISTER_ENUM (AIFF); REGISTER_ENUM (iXML); REGISTER_ENUM (RF64); + REGISTER_ENUM (RF64_WAV); + REGISTER_ENUM (MBWF); REGISTER (_HeaderFormat); REGISTER_ENUM (AudioUnit); @@ -363,10 +416,23 @@ setup_enum_writer () REGISTER_CLASS_ENUM (SessionEvent, Audition); REGISTER_CLASS_ENUM (SessionEvent, InputConfigurationChange); REGISTER_CLASS_ENUM (SessionEvent, SetPlayAudioRange); + REGISTER_CLASS_ENUM (SessionEvent, CancelPlayAudioRange); + REGISTER_CLASS_ENUM (SessionEvent, RealTimeOperation); + REGISTER_CLASS_ENUM (SessionEvent, AdjustPlaybackBuffering); + REGISTER_CLASS_ENUM (SessionEvent, AdjustCaptureBuffering); + REGISTER_CLASS_ENUM (SessionEvent, SetTimecodeTransmission); + REGISTER_CLASS_ENUM (SessionEvent, Skip); REGISTER_CLASS_ENUM (SessionEvent, StopOnce); REGISTER_CLASS_ENUM (SessionEvent, AutoLoop); + REGISTER_CLASS_ENUM (SessionEvent, AutoLoopDeclick); REGISTER (_SessionEvent_Type); + REGISTER_CLASS_ENUM (SessionEvent, Add); + REGISTER_CLASS_ENUM (SessionEvent, Remove); + REGISTER_CLASS_ENUM (SessionEvent, Replace); + REGISTER_CLASS_ENUM (SessionEvent, Clear); + REGISTER (_SessionEvent_Action); + REGISTER_CLASS_ENUM (Session, Stopped); REGISTER_CLASS_ENUM (Session, Waiting); REGISTER_CLASS_ENUM (Session, Running); @@ -423,11 +489,6 @@ setup_enum_writer () REGISTER_CLASS_ENUM (Session, pullup_Minus4Minus1); REGISTER (_Session_PullupFormat); - REGISTER_CLASS_ENUM (Route, Auditioner); - REGISTER_CLASS_ENUM (Route, MasterOut); - REGISTER_CLASS_ENUM (Route, MonitorOut); - REGISTER_BITS (_Route_Flag); - REGISTER_CLASS_ENUM (Source, Writable); REGISTER_CLASS_ENUM (Source, CanRename); REGISTER_CLASS_ENUM (Source, Broadcast); @@ -436,6 +497,7 @@ setup_enum_writer () REGISTER_CLASS_ENUM (Source, RemoveAtDestroy); REGISTER_CLASS_ENUM (Source, NoPeakFile); REGISTER_CLASS_ENUM (Source, Destructive); + REGISTER_CLASS_ENUM (Source, Empty); REGISTER_BITS (_Source_Flag); REGISTER_ENUM (FadeLinear); @@ -445,6 +507,16 @@ setup_enum_writer () REGISTER_ENUM (FadeSymmetric); REGISTER (_FadeShape); + REGISTER_ENUM(None); + REGISTER_ENUM(NewlyCreatedLeft); + REGISTER_ENUM(NewlyCreatedRight); + REGISTER_ENUM(NewlyCreatedBoth); + REGISTER_ENUM(Existing); + REGISTER_ENUM(ExistingNewlyCreatedLeft); + REGISTER_ENUM(ExistingNewlyCreatedRight); + REGISTER_ENUM(ExistingNewlyCreatedBoth); + REGISTER (_RegionSelectionAfterSplit); + REGISTER_CLASS_ENUM (Diskstream, Recordable); REGISTER_CLASS_ENUM (Diskstream, Hidden); REGISTER_CLASS_ENUM (Diskstream, Destructive); @@ -457,8 +529,13 @@ setup_enum_writer () REGISTER_CLASS_ENUM (Location, IsCDMarker); REGISTER_CLASS_ENUM (Location, IsSessionRange); REGISTER_CLASS_ENUM (Location, IsRangeMarker); + REGISTER_CLASS_ENUM (Location, IsSkip); REGISTER_BITS (_Location_Flags); + REGISTER_CLASS_ENUM (TempoSection, Ramp); + REGISTER_CLASS_ENUM (TempoSection, Constant); + REGISTER (_TempoSection_Type); + REGISTER_CLASS_ENUM (Track, NoFreeze); REGISTER_CLASS_ENUM (Track, Frozen); REGISTER_CLASS_ENUM (Track, UnFrozen); @@ -613,6 +690,31 @@ setup_enum_writer () REGISTER_ENUM (Evoral::OverlapEnd); REGISTER_ENUM (Evoral::OverlapExternal); REGISTER(_OverlapType); + + REGISTER_ENUM (Small); + REGISTER_ENUM (Medium); + REGISTER_ENUM (Large); + REGISTER_ENUM (Custom); + REGISTER(_BufferingPreset); + + REGISTER_ENUM (LastLocate); + REGISTER_ENUM (RangeSelectionStart); + REGISTER_ENUM (Loop); + REGISTER_ENUM (RegionSelectionStart); + REGISTER_BITS (_AutoReturnTarget); + + REGISTER_CLASS_ENUM (PresentationInfo, AudioTrack); + REGISTER_CLASS_ENUM (PresentationInfo, MidiTrack); + REGISTER_CLASS_ENUM (PresentationInfo, AudioBus); + REGISTER_CLASS_ENUM (PresentationInfo, MidiBus); + REGISTER_CLASS_ENUM (PresentationInfo, VCA); + REGISTER_CLASS_ENUM (PresentationInfo, MasterOut); + REGISTER_CLASS_ENUM (PresentationInfo, MonitorOut); + REGISTER_CLASS_ENUM (PresentationInfo, Auditioner); + REGISTER_CLASS_ENUM (PresentationInfo, Selected); + REGISTER_CLASS_ENUM (PresentationInfo, Hidden); + REGISTER_CLASS_ENUM (PresentationInfo, OrderSet); + REGISTER_BITS (_PresentationInfo_Flag); } } /* namespace ARDOUR */ @@ -646,6 +748,7 @@ std::ostream& operator<<(std::ostream& o, const SampleFormat& var) std::string s = enum_2_string (var); return o << s; } + std::istream& operator>>(std::istream& o, AutoConnectOption& var) { std::string s; @@ -660,6 +763,20 @@ std::ostream& operator<<(std::ostream& o, const AutoConnectOption& var) return o << s; } +std::istream& operator>>(std::istream& o, TracksAutoNamingRule& var) +{ + std::string s; + o >> s; + var = (TracksAutoNamingRule) string_2_enum (s, var); + return o; +} + +std::ostream& operator<<(std::ostream& o, const TracksAutoNamingRule& var) +{ + std::string s = enum_2_string (var); + return o << s; +} + std::istream& operator>>(std::istream& o, MonitorModel& var) { std::string s; @@ -730,41 +847,41 @@ std::ostream& operator<<(std::ostream& o, const AFLPosition& var) return o << s; } -std::istream& operator>>(std::istream& o, RemoteModel& var) +std::istream& operator>>(std::istream& o, EditMode& var) { std::string s; o >> s; - var = (RemoteModel) string_2_enum (s, var); + var = (EditMode) string_2_enum (s, var); return o; } -std::ostream& operator<<(std::ostream& o, const RemoteModel& var) +std::ostream& operator<<(std::ostream& o, const EditMode& var) { std::string s = enum_2_string (var); return o << s; } -std::istream& operator>>(std::istream& o, EditMode& var) +std::istream& operator>>(std::istream& o, ListenPosition& var) { std::string s; o >> s; - var = (EditMode) string_2_enum (s, var); + var = (ListenPosition) string_2_enum (s, var); return o; } -std::ostream& operator<<(std::ostream& o, const EditMode& var) +std::ostream& operator<<(std::ostream& o, const ListenPosition& var) { std::string s = enum_2_string (var); return o << s; } -std::istream& operator>>(std::istream& o, ListenPosition& var) +std::istream& operator>>(std::istream& o, LayerModel& var) { std::string s; o >> s; - var = (ListenPosition) string_2_enum (s, var); + var = (LayerModel) string_2_enum (s, var); return o; } -std::ostream& operator<<(std::ostream& o, const ListenPosition& var) +std::ostream& operator<<(std::ostream& o, const LayerModel& var) { std::string s = enum_2_string (var); return o << s; @@ -902,6 +1019,7 @@ std::ostream& operator<<(std::ostream& o, const Evoral::OverlapType& var) std::string s = enum_2_string (var); return o << s; } + std::istream& operator>>(std::istream& o, FadeShape& var) { std::string s; @@ -915,3 +1033,59 @@ std::ostream& operator<<(std::ostream& o, const FadeShape& var) std::string s = enum_2_string (var); return o << s; } + +std::istream& operator>>(std::istream& o, RegionSelectionAfterSplit& var) +{ + std::string s; + o >> s; + var = (RegionSelectionAfterSplit) string_2_enum (s, var); + return o; +} + +std::ostream& operator<<(std::ostream& o, const RegionSelectionAfterSplit& var) +{ + std::string s = enum_2_string (var); + return o << s; +} + +std::istream& operator>>(std::istream& o, ARDOUR::BufferingPreset& var) +{ + std::string s; + o >> s; + var = (ARDOUR::BufferingPreset) string_2_enum (s, var); + return o; +} + +std::ostream& operator<<(std::ostream& o, const ARDOUR::BufferingPreset& var) +{ + std::string s = enum_2_string (var); + return o << s; +} + +std::istream& operator>>(std::istream& o, AutoReturnTarget& var) +{ + std::string s; + o >> s; + var = (AutoReturnTarget) string_2_enum (s, var); + return o; +} + +std::ostream& operator<<(std::ostream& o, const AutoReturnTarget& var) +{ + std::string s = enum_2_string (var); + return o << s; +} + +std::istream& operator>>(std::istream& o, MeterType& var) +{ + std::string s; + o >> s; + var = (MeterType) string_2_enum (s, var); + return o; +} + +std::ostream& operator<<(std::ostream& o, const MeterType& var) +{ + std::string s = enum_2_string (var); + return o << s; +}