webaudio-examples icon indicating copy to clipboard operation
webaudio-examples copied to clipboard

white noise live demo throws error

Open aprice2704 opened this issue 2 years ago • 2 comments

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createBuffer

What specific section or headline is this issue about?

white noise live demo throws error in Chrome

What information was incorrect, unhelpful, or incomplete?

The white noise demo at https://mdn.github.io/webaudio-examples/audio-buffer/ produces an error: on the js console

Uncaught TypeError: Failed to construct 'AudioBuffer': Failed to read the 'length' property from 'AudioBufferOptions': Required member is undefined.
    at button.onclick ((index):35:22)

as a result, it plays no noise :(

What did you expect to see?

no error, white noise played

Do you have any supporting links, references, or citations?

Chrome: Version 105.0.5195.52 (Official Build) beta (64-bit) Windows 11 build : 22000.856

Do you have anything more you want to share?

No response

MDN metadata

Page report details
  • Folder: en-us/web/api/baseaudiocontext/createbuffer
  • MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createBuffer
  • GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/baseaudiocontext/createbuffer/index.md
  • Last commit: https://github.com/mdn/content/commit/ebdeb85d2e1d5111ccb688221cfa28b321874b9e
  • Document last modified: 2022-06-03T04:22:01.000Z

aprice2704 avatar Aug 27 '22 05:08 aprice2704

It throws on Firefox too. But this is weird… I would have bet to have tested it about one month ago, and I don't really understand the message, given the code. (even with the debugger).

teoli2003 avatar Aug 27 '22 06:08 teoli2003

I think I found it.

The code at github-pages is outdated. The code in the repo does work. Apparently there was an error when deploying it to github-pages:

image https://github.com/mdn/webaudio-examples/deployments

Leokuma avatar Aug 28 '22 16:08 Leokuma

Hi @aprice2704 , thanks for raising the issue. It looks like this is resolved now so I will move this to closed.

Thank you :)

bsmth avatar Nov 02 '22 14:11 bsmth