Search Issue Tracker

Fixed

Fixed in 6000.4.0a5, 6000.5.0a1

Votes

0

Found in

6000.4.0a2

6000.5.0a1

Issue ID

UUM-123296

Regression

Yes

Regression in Web Audio Support "JS_Sound_GetAudioContextSampleRate is not defined", "Setting non-finite value for loopStart")

-

Steps to reproduce:

  1.  Open project TestSuite-MobileAudio
  2. Switch to Platform Web
  3.  Click on Build & Run

\\
Actual results: The test suite crashes with errors:
{noformat}
JS_Sound_GetAudioContextSampleRate is not defined
{noformat}
{noformat}
"Setting non-finite value for loopStart"
{noformat}

Expected results: The test suite works as expected. All audio tests supported by the Web work without throwing errors.

\\
Reproducible with versions: 6000.4.0a2, 6000.5.0a1

Not reproducible with versions:  6000.4.0a1, 6000.0, 6000.1, 6000.2, 6000.3,

\\
Tested on (OS): Windows 11

\\
Notes:

  •  The cause of the regression are refactorings in the PlatformDependent\WebGL\js\Audio.js file

Fixes:
{code:javascript}
soundClip.getFrequency = function () {
console.warn("getFrequency() is not supported for compressed sound.");
// Before: return JS_Sound_GetAudioContextSampleRate();
// Fix:
return _JS_Sound_GetAudioContextSampleRate();
}
{code}

{code:javascript}
/*
Gets sampling rate in Hz

  • @returns {number}

*/
soundClip.getFrequency = function () {
if (!this.buffer) {
console.log ("Trying to get metadata of sound which is not loaded.");
// Before: return 0;
// Fix:
return WEBAudio.FAKEMOD_SAMPLERATE;
}

return this.buffer.sampleRate;
}
{code}

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.