fix(28-02): check pendingUpdates in getLevelSnapshot
The vuStore RAF loop only runs with subscribers, but SessionTrackVU uses direct polling without subscribing. Changed getLevelSnapshot to check pendingUpdates first for immediate access to latest VU data. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a020e27260
commit
a1d24fe385
|
|
@ -97,12 +97,14 @@ export const vuStore = {
|
|||
/**
|
||||
* Get snapshot of single mixer's VU level
|
||||
* More efficient for components that only need one mixer's data
|
||||
* Checks both pending updates and flushed levels for immediate access
|
||||
*
|
||||
* @param {string} mixerId - Qualified mixer ID
|
||||
* @returns {Object|null} - { level, clipping, timestamp } or null
|
||||
*/
|
||||
getLevelSnapshot(mixerId) {
|
||||
return vuLevels[mixerId] || null;
|
||||
// Check pending updates first (most recent), then flushed levels
|
||||
return pendingUpdates[mixerId] || vuLevels[mixerId] || null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue