Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU benchmark utility hangs #32

Open
shariq-audiofocus opened this issue Jun 3, 2020 · 2 comments
Open

CPU benchmark utility hangs #32

shariq-audiofocus opened this issue Jun 3, 2020 · 2 comments

Comments

@shariq-audiofocus
Copy link

When running the CPU benchmark utility (https://cdn.rawgit.com/resonance-audio/resonance-audio-web-sdk/master/examples/benchmark.html) it hangs.

Steps to Reproduce:

  1. Open https://cdn.rawgit.com/resonance-audio/resonance-audio-web-sdk/master/examples/benchmark.html
  2. Click Begin
  3. Says 'Please Wait' for hours.
  4. Happens in Chrome on OSX but I believe it's platform agnostic.

Underlying issue:
Looking in the Browser Console (F12) I see the following error:
benchmark.js:119 Uncaught TypeError: audioContext.createMediaElementSource is not a function at startBenchmark (benchmark.js:119)

which points to this code:

let audioContext = new OfflineAudioContext(numberOutputChannels, durationSeconds * sampleRate, sampleRate); let audioElementSource = audioContext.createMediaElementSource(audioElement);

It seems OfflineAudioContext no longer has the createMediaElementSource function (see WebAudio/web-audio-api#308 and https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext). Looks like OfflineAudioContext now inherits from BaseAudioContext which does not have the necessary function.

@jacksongoode
Copy link

This would be great to be fixed, as performance comparisons between the systems don't seem to exist anywhere else on the web.

@jacksongoode
Copy link

When running the CPU benchmark utility (https://cdn.rawgit.com/resonance-audio/resonance-audio-web-sdk/master/examples/benchmark.html) it hangs.

Steps to Reproduce:

  1. Open https://cdn.rawgit.com/resonance-audio/resonance-audio-web-sdk/master/examples/benchmark.html
  2. Click Begin
  3. Says 'Please Wait' for hours.
  4. Happens in Chrome on OSX but I believe it's platform agnostic.

Underlying issue:
Looking in the Browser Console (F12) I see the following error:
benchmark.js:119 Uncaught TypeError: audioContext.createMediaElementSource is not a function at startBenchmark (benchmark.js:119)

which points to this code:

let audioContext = new OfflineAudioContext(numberOutputChannels, durationSeconds * sampleRate, sampleRate); let audioElementSource = audioContext.createMediaElementSource(audioElement);

It seems OfflineAudioContext no longer has the createMediaElementSource function (see WebAudio/web-audio-api#308 and https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext). Looks like OfflineAudioContext now inherits from BaseAudioContext which does not have the necessary function.

Do you know if this could then be replaced with createBufferSource()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants