fix(bridge): load dung VSTi theo track (V9) - bo early-return mui theo flag, load qua Tauri invoke khi co path, guard path sai (WaveObserver vs Nexus), chi mo GUI khi load OK; sync 6 ban JS + index.html ?v; kem cac fix bridge truoc (bugs 1-4, GUI restore)
This commit is contained in:
@@ -1170,13 +1170,12 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
});
|
||||
}
|
||||
// FIX auto-play: KHONG tu bat transport khi restore state -- bridge
|
||||
// khong duoc tu phat am. Frontend la chu transport: page dang play
|
||||
// that su se tu gui PLAY lai sau reconnect; page fresh thi im lang.
|
||||
if (snap.playing) {
|
||||
playheadSamples = (uint64_t)snap.playhead;
|
||||
transportStopped = false;
|
||||
g_transportPlaying = true;
|
||||
g_stateDirty = true;
|
||||
std::cout << "[NativeBridge] restoring transport PLAY playhead="
|
||||
<< playheadSamples.load() << std::endl;
|
||||
std::cout << "[NativeBridge] restore transport SKIPPED (snap.playing=true)"
|
||||
<< std::endl;
|
||||
}
|
||||
} else {
|
||||
std::cout << "[NativeBridge] no state file to restore (" << stateFile << ")" << std::endl;
|
||||
@@ -1386,8 +1385,8 @@ int main(int argc, char* argv[]) {
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(g_pendingGuiMutex);
|
||||
for (auto it = g_pendingGui.begin(); it != g_pendingGui.end(); ) {
|
||||
// G0.1: giu entry khi dang PLAY - handleOpenGui se defer lai
|
||||
if (transportStopped && instruments.has(it->first)) {
|
||||
// G0.1: fulfill as soon as instrument is ready, even while playing
|
||||
if (instruments.has(it->first)) {
|
||||
readyGui.push_back({ it->first, it->second });
|
||||
it = g_pendingGui.erase(it);
|
||||
} else ++it;
|
||||
|
||||
Reference in New Issue
Block a user