How can I play audio in reverse with the web audio API? I can't seem to find anything in the API docs...
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
You could do something like this:
It's a super simple example - but the point is basically that you can grab the
Float32Array
instance for each channel in the AudioBuffer and reverse them.You can use
<audio>
element of html5 and setplaybackRate
property to negative value.In Javascript you can do the following
if you have an AudioBufferSourceNode element:
-EDIT-
Webkit doesn't have that feature.
Source: https://bugs.webkit.org/show_bug.cgi?id=69725
works in Safari (9.1.2) now!