Key Design View's parked FX-offline state to the FX's own GUID, not its slot
view_state v2 writes identities beside the v1 slot array, so a downgrade keeps what it had. An FX gone at restore time is dropped and reported, never restored onto whatever took its place.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "core/view/fx_offline.h"
|
||||
#include "core/view/solo_cache.h"
|
||||
|
||||
namespace reasampler {
|
||||
@@ -201,13 +202,16 @@ struct TrackSnapshot {
|
||||
int mainSend = 0; // B_MAINSEND prior value
|
||||
int fxEnable = 0; // I_FXEN prior value
|
||||
|
||||
// Prior per-FX offline state, index = fx slot.
|
||||
std::vector<int> fxOffline;
|
||||
// Prior per-FX offline state in capture-time slot order, keyed per fxKeying:
|
||||
// by the FX's own identity (live capture), or by position (a snapshot lifted
|
||||
// from a project saved before identity was recorded).
|
||||
std::vector<FxOfflineState> fxOffline;
|
||||
FxKeying fxKeying = FxKeying::Identity;
|
||||
|
||||
bool operator==(const TrackSnapshot& o) const {
|
||||
return showInTcp == o.showInTcp && showInMixer == o.showInMixer &&
|
||||
mainSend == o.mainSend && fxEnable == o.fxEnable &&
|
||||
fxOffline == o.fxOffline;
|
||||
fxOffline == o.fxOffline && fxKeying == o.fxKeying;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -231,17 +235,6 @@ struct TrackFlagOp {
|
||||
}
|
||||
};
|
||||
|
||||
// One per-FX offline write: TrackFX_SetOffline(guid, fxIndex, offline).
|
||||
struct FxOfflineOp {
|
||||
std::string guid;
|
||||
int fxIndex = 0;
|
||||
bool offline = false;
|
||||
|
||||
bool operator==(const FxOfflineOp& o) const {
|
||||
return guid == o.guid && fxIndex == o.fxIndex && offline == o.offline;
|
||||
}
|
||||
};
|
||||
|
||||
// One managed-lane play/show write the shell must apply (translated into
|
||||
// C_LANEPLAYS / I_FIXEDLANE / B_FIXEDLANE_HIDDEN). Emitted for MANAGED lanes
|
||||
// only — never a manual lane; enforced in planToggle and mirrored by
|
||||
@@ -257,9 +250,10 @@ struct LanePlayOp {
|
||||
};
|
||||
|
||||
// The complete set of operations to park one inactive leaf, or restore one
|
||||
// leaf. Park uses fixed zeros; restore uses a snapshot's values. fxOffline is
|
||||
// per known FX slot: on park all slots go offline (from the snapshot's slot
|
||||
// count); on restore each slot returns to its captured value.
|
||||
// leaf. Park uses fixed zeros; restore uses a snapshot's values. Park's
|
||||
// fxOffline ops are slot-keyed (every live slot goes offline); restore's carry
|
||||
// the snapshot's keying and are resolved against the live chain by
|
||||
// resolveFxRestore before any write.
|
||||
struct TrackPlan {
|
||||
std::vector<TrackFlagOp> flags;
|
||||
std::vector<FxOfflineOp> fxOffline;
|
||||
|
||||
Reference in New Issue
Block a user