Skip to content

Commit

Permalink
merge pull request jeromeetienne#10 - thanks @Doidel
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeetienne committed Mar 3, 2014
1 parent 723aa0c commit a6b5219
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,25 @@ Additionally there is ```WebAudiox.loadBuffer.inProgressCount```.
it is counter of all the .loadBuffer in progress.
it useful to know is all your sounds as been loaded.


#### OfflineAudioContext for fast decoding

With the normal AudioContext decoding e.g. an mp3 file takes just
as long as the mp3 file lasts. So if your mp3 file's duration is
1.5 minutes then your decompression (or analyzation, etc.) takes
1.5 minutes, which might be unbearable for your app.
OfflineAudioContext allows faster than realtime decompression,
for example:

```javascript
var AudioContext = window.AudioContext || window.webkitAudioContext;
var OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;
this._context = new AudioContext();
this._loaderContext = new OfflineAudioContext(2, 1024, 44100); //22050 to 96000, CD = 44100
```

See the [W3C docs for OfflineAudioContext](https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#OfflineAudioContext-section)

# webaudiox.three.js

This is useful lf you have a three.js scene and would like to play spacial sound in it.
Expand Down

0 comments on commit a6b5219

Please sign in to comment.