AudioListener linearRampToValueAtTime execution grows over time to eventually dominate the frame time

Has anyone here noticed an issue with AudioListener eventually dominating the performance graph after running for long periods? I have an app with an AudioListener, and after leaving it running for 6 hours, it gradually slows down… if I then pause it and .remove the audioListener from the scene… fps suddenly goes back up to 60

notice the “linearRampToValueAtTime” is dominating the frame…
That method is used inside three to interpolate audio listener parameters, Inside updateMatrixWorld… And it uses a THREE.Clock deltaT internally to select the interpolant values…

Curious if anyone has seen a similar issue?

1 Like


I’ve already asked the OP at github to file an issue at:

But it seems he has not done it so dar. Can you file an issue instead, please? I mean you’ve already gathered the relevant performance data.

Ahhh thanks for the reference/links… I’ll do some more investigating…

I’m not sure that it’s a browser bug per-se, more that its an inherently thorny problem.

Saw this… possibly related:

I’ll keep looking into it.

1 Like

I posted a synopsis of my questions on that chromium bug I linked… perhaps getting some more google eyes on it will yield more information… I’ll keep looking into it… Thanks again, @Mugen87 !

still getting the same issue, is there any workaround,aside from programming all audio outside of THREE.js?

  • my audio context is loaded on TouchStart / Mousedown
  • I notice the issue mainly on mobile safari
        if (!audioContextStarted) {
	        const listener = new THREE.AudioListener();;
	        game.sound = new THREE.Audio(listener);
	        const audioLoader = new THREE.AudioLoader();
	        var self = game;
	        audioLoader.load('mp3/powerup2.mp3', function(buffer) {
	        game.sound2 = new THREE.Audio(listener);
	        audioLoader.load('mp3/hit.mp3', function(buffer) {
	        game.sound3 = new THREE.Audio(listener);
	        audioLoader.load('mp3/lickshots.mp3', function(buffer) {
	            //self.sound3.setVolume( 0.0 );

	        audioContextStarted = true;