fix: harden adaptive audio resume and release
This commit is contained in:
@@ -298,6 +298,20 @@ describe('soundtrack engine', () => {
|
||||
expect(test.mixer.setDriveLiftAvailableAt).toHaveBeenCalledWith(drive.starts[0]!.at);
|
||||
});
|
||||
|
||||
it('does not reload the attached drive lift after resuming established main playback', async () => {
|
||||
const test = createEngineHarness({
|
||||
chapter: resolveChapterIntent('experience'),
|
||||
drive: { energy: 0.8, source: 'physical' },
|
||||
});
|
||||
await test.graph.resume();
|
||||
await test.flushOptionalLoads();
|
||||
|
||||
await test.graph.suspend();
|
||||
await test.graph.resume();
|
||||
|
||||
expect(test.loadCalls.filter((url) => url === '/drive-lift.opus')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('routes drive commands immediately to texture and mixer', () => {
|
||||
const test = createEngineHarness();
|
||||
const sample = { energy: 0.72, source: 'physical' } as const;
|
||||
|
||||
Reference in New Issue
Block a user