Audio parameter not set. Wait for current ramp to finish

@docEdub I regularly rebelieve an error for the ramps for the Audio engine

Uncaught Error: Audio parameter not set. Wait for current ramp to finish.
at e.setTargetValue (babylon.js?1751371436:1:215283)
at e.set (babylon.js?1751371436:1:214667)
at t._setWebAudioOrientation (babylon.js?1751371436:1:2714495)
at t._updateRotation (babylon.js?1751371436:1:2713796)
at e.update (babylon.js?1751371436:1:447133)
at t.update (babylon.js?1751371436:1:2713011)
at o (babylon.js?1751371436:1:1065117)

So I don"t know if I"m doing anything wrong, but it seems pretty random. On the PG it happens sometimes, but I don"t always reproduce it.

So I don"t have a PG that allows me to see the problem, because it"s very random.

But from what I see is that it seems to link to the last feature: (fadeInt/fadeout) on the ramps and wait on the audio engine.

Are you using the new setVolume function? Or is this happening when setting the volume property?

Oh interesting, this isn’t even the volume you’re setting. I’ll investigate. This shouldn’t be happening.

I don"t know if it corresponds to volume.
It just happens when the engine is initialized:
I made my own class to use the V2 audio engine

async initSoundEngine() {
        this.audioEngine = await BABYLON.CreateAudioEngineAsync({ listenerEnabled: true, disableDefaultUI: true});
        this.audioEngine.volume = 1.0; 
        if (this.scene.activeCamera) {
            this.audioEngine.listener.attach(this.scene.activeCamera, true);
        }
        await this.audioEngine.unlockAsync();
        return this.audioEngine;
    }

// Use :
this.soundEngine = new AudioEngine(this.scene);
this.soundEngine.initSoundEngine();		

Sometimes it happens, sometimes it doesn"t. I think there"s a story of “wait” missing somewhere (maybe)

Ya, I’m reproducing this, too and investigating a fix.

2 Likes

Will be fixed when PR 16839 is merged.

1 Like

Thanks.