fix: rebalance procedural audio mix
This commit is contained in:
@@ -212,6 +212,29 @@ describe('audio controller lifecycle', () => {
|
||||
});
|
||||
|
||||
describe('procedural audio graph', () => {
|
||||
it('keeps the soundtrack clearly ahead of the ambient drive effects across intensity changes', async () => {
|
||||
vi.useFakeTimers();
|
||||
const context = new FakeAudioContext();
|
||||
|
||||
try {
|
||||
const graph = createSynthEngine(() => context as unknown as AudioContext);
|
||||
const [, musicGain, engineGain, , , roadGain, ignitionGain] = context.gains;
|
||||
|
||||
expect(musicGain?.gain.value).toBe(0.78);
|
||||
expect(engineGain?.gain.value).toBe(0.09);
|
||||
expect(roadGain?.gain.value).toBe(0.018);
|
||||
expect(ignitionGain?.gain.scheduledValues).toEqual([0.0001, 0.025, 0.0001]);
|
||||
|
||||
graph.setIntensity(1);
|
||||
expect(engineGain?.gain.targetValues).toContain(0.13);
|
||||
expect(roadGain?.gain.targetValues).toContain(0.038);
|
||||
|
||||
await graph.close();
|
||||
} finally {
|
||||
vi.useRealTimers();
|
||||
}
|
||||
});
|
||||
|
||||
it('routes independent music, engine, and road buses through compression before the master output', async () => {
|
||||
vi.useFakeTimers();
|
||||
const context = new FakeAudioContext();
|
||||
|
||||
Reference in New Issue
Block a user