Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home for chromium.org
« Groups Home
Web Audio API, delay doesn't work
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
macrojd  
View profile  
 More options Nov 11 2012, 6:43 pm
From: macrojd <macr...@yahoo.com.ar>
Date: Sun, 11 Nov 2012 15:43:39 -0800 (PST)
Local: Sun, Nov 11 2012 6:43 pm
Subject: Web Audio API, delay doesn't work

Hi guys. I'm still checking a few APIs and I came across a little problem
with Web Audio. I can't make the delay node work. I created the source,
connected the source to the delay node and the not to the destination. I
also connected the source to the destination to here both sounds, but the
sound with the delay never gets to the speakers. I tries the same pattern
in two different application. In http://ykifle.github.com/audiograph/ it
doesn't work like in my script (once you set the delay to something
different than 0 you only get silence). And
at http://webaudioplayground.appspot.com, the delay works, but it can't be
set for more than 1 second.

Apparently there is a way to make it work, but I can't find the way. Here
is my play() function:

function play(mybuffer){
  var sourceNode = context.createBufferSource();
  sourceNode.buffer = mybuffer;

  delayNode = context.createDelay();
  delayNode.delayTime.value = 0.5;

  sourceNode.connect(context.destination);
  sourceNode.connect(delayNode);
  delayNode.connect(context.destination);
  sourceNode.start(0);

}

I also tried to set several delays with the AudioParam methods, but didn't
work. As soon as I declare a value for the delay, I get silence.

Am I missing something?

Thanks
JD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Wilson  
View profile  
 More options Nov 12 2012, 11:30 am
From: Chris Wilson <cwi...@google.com>
Date: Mon, 12 Nov 2012 08:30:40 -0800
Local: Mon, Nov 12 2012 11:30 am
Subject: Re: [chromium-html5] Web Audio API, delay doesn't work

Hey JD -
From the symptoms, I'm presuming you're getting a script error somewhere.
 Can you either send me the full code, or (better yet) point me to a web
address where it's posted?

(I wrote the Web Audio Playground, BTW - the delay being limited to 1.0
second there is only a UI limit.  It was hard to select small "echo"-style
delay values easily otherwise.)

-C


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
macrojd  
View profile  
 More options Nov 12 2012, 3:49 pm
From: macrojd <macr...@yahoo.com.ar>
Date: Mon, 12 Nov 2012 12:49:09 -0800 (PST)
Local: Mon, Nov 12 2012 3:49 pm
Subject: Re: [chromium-html5] Web Audio API, delay doesn't work

Hi Chris. Sure I know who you are, I first learned the API thanks to your
video from Google I/O!

Here is the link to my script. It was extremely simplified because is an
example I'm preparing for my book and the examples are always minimized for
didactic purposes.

http://www.minkbooks.com/test/audio3b.html

The script doesn't return any error, but probably the construction is wrong
because it is my first try with delays. I tried the same construction at
http://ykifle.github.com/audiograph/ and it doesn't work either, so I
suppose he is having the same problem I have.

JD
www.jdgauchat.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
macrojd  
View profile  
 More options Nov 12 2012, 6:56 pm
From: macrojd <macr...@yahoo.com.ar>
Date: Mon, 12 Nov 2012 15:56:25 -0800 (PST)
Local: Mon, Nov 12 2012 6:56 pm
Subject: Re: [chromium-html5] Web Audio API, delay doesn't work

Hi Chris. Well, I found out that the problem is only with that particular
file (gunshot.wav). I replaced the file by another one and it worked!

I'll try with more files to check if it was a corrupt file or something
like that.

JD


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Wilson  
View profile  
 More options Nov 12 2012, 7:01 pm
From: Chris Wilson <cwi...@google.com>
Date: Mon, 12 Nov 2012 16:00:59 -0800
Local: Mon, Nov 12 2012 7:00 pm
Subject: Re: [chromium-html5] Web Audio API, delay doesn't work

Heh.  I sent mail internally one minute before you did.

It doesn't seem to be that file alone; I replicated it with another audio
file.  However, when I converted the file to mono, it worked correctly.  It
appears to be getting cut off (that is, the delay node stops producing
audio) when the original buffer source ends.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »