Jump to content

Getting Started Web Audio API


KyleNau
 Share

Recommended Posts

  • 1 month later...
  • 3 months later...
  • 8 months later...

Hmm, this worked 2 days ago, tried it today and got an error.  I typed the Sound.js exactly as you have yours, but I added looping capabilities, but I swear it was working 2 days ago, and I haven't touched it until now...

 

I just got an error on the that.volume = audioContext.createGainNode(); line.

I inspected (console.log) the audioContext object and saw that there was a .createGain() but not .createGainNode(), I changed it and got a new error

on the playSound.noteOn(0); line. Upon further inspection I saw that it no longer existed and so I replaced it with playSound.start(); and that fixed it.

 

So I'm wondering if there was an update to the web audio api?

Link to comment
Share on other sites

  • 1 month later...

Sorry I've missed updating this post.

 

Yes, the Web Audio API has been updated in both Chrome and FireFox. The term "node" is being dropped from most of the commands, so createPannerNode would now be createPanner and the webkit prefix is being dropped from AudioContext. It's still there for Safari, though.

 

Basically, it's being broken again in order to be fixed. Don't you love HTML5 :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...