13
0

change nature of CueBehavior enum to be bitwise

This allows us to OR-in the ImplicitlyIgnoreCues bits, and still toggle
FollowCues on and off to indicate user-requested behavior
This commit is contained in:
Paul Davis 2022-01-06 11:59:58 -07:00
parent 44d52133ae
commit 8bf494e5a8
3 changed files with 4 additions and 6 deletions

View File

@ -812,9 +812,8 @@ enum LocateTransportDisposition {
}; };
enum CueBehavior { enum CueBehavior {
FollowCues, FollowCues = 0x1,
ImplicitlyIgnoreCues, ImplicitlyIgnoreCues = 0x2
ExplicitlyIgnoreCues
}; };
typedef std::vector<CaptureInfo*> CaptureInfos; typedef std::vector<CaptureInfo*> CaptureInfos;

View File

@ -880,8 +880,7 @@ setup_enum_writer ()
REGISTER_ENUM (FollowCues); REGISTER_ENUM (FollowCues);
REGISTER_ENUM (ImplicitlyIgnoreCues); REGISTER_ENUM (ImplicitlyIgnoreCues);
REGISTER_ENUM (ExplicitlyIgnoreCues); REGISTER_BITS (_CueBehavior);
REGISTER (_CueBehavior);
} }
} /* namespace ARDOUR */ } /* namespace ARDOUR */

View File

@ -1636,7 +1636,7 @@ Session::first_cue_within (samplepos_t s, samplepos_t e)
return active_cue; return active_cue;
} }
if (Config->get_cue_behavior() != FollowCues) { if (!(Config->get_cue_behavior() & FollowCues)) {
return -1; return -1;
} }