fix: audio track undo buffer rehydration

This commit is contained in:
Xiaohan-Tian
2026-06-07 13:06:34 -07:00
parent a76a8abb94
commit 94befcdd95
3 changed files with 228 additions and 23 deletions
@@ -339,6 +339,20 @@ export class KGAudioInterface {
}
}
/**
* Check whether an audio track currently has a player bus.
*/
public hasTrackAudioPlayerBus(trackId: string): boolean {
return this.trackAudioPlayerBuses.has(trackId);
}
/**
* Check whether an audio buffer is loaded on a specific track's player bus.
*/
public hasAudioBufferForTrack(trackId: string, audioFileId: string): boolean {
return this.trackAudioPlayerBuses.get(trackId)?.hasBuffer(audioFileId) ?? false;
}
/**
* Load an audio buffer into a track's player bus
*/