- From: Noah Mendelsohn <nrm@arcanedomain.com>
- Date: Mon, 28 Feb 2011 11:02:53 -0500
- To: Ryan Berdeen <ryan@ryanberdeen.com>
- CC: public-xg-audio@w3.org
I agree. It should be possible, memory permitting, to buffer the full data, or any selected areas of data, for clips of much longer than a minute or so. Whether AudioBuffer is the right abstraction for this, I'm not sure, but if I want to build something like an audio mixer application, or if I'm building a scientific application that analyses audio, I might want lots of flexibility to buffer various bits of the audio as necessary to maintain performance, graph waveforms, etc. Which parts of the proposed API are to be used for such things? (I admit I'm just learning about the API, so maybe I've missed something obvious.) Noah On 2/27/2011 7:25 PM, Ryan Berdeen wrote: > Using the Web Audio API, how should I access the data of an audio file > longer than a minute? > >> From the current specification on AudioBuffers at > http://chromium.googlecode.com/svn/trunk/samples/audio/specification/specification.html#AudioBuffer-section: > >> Typically, it would be expected that the length of the PCM data would be >> fairly short (usually somewhat less than a minute). For longer sounds, >> such as music soundtracks, streaming should be used with the audio >> element and MediaElementAudioSourceNode. > > I can use AudioBuffers in conjunction with JavaScriptAudioNodes to > manipulate the audio data, but I don't see a way to do this with a > MediaElementAudioSourceNode. Let's say I wish to play an MP3 file of a > typical 3 minute long song backwards. How should I accomplish this? > The API discourages me from loading the song into an AudioBuffer due > to it's length, but this seems to be the only way to directly access > and manipulate the audio data. > > For comparison, with Flash and ActionScript 3, I can load an MP3 as a > Sound object and use the "extract" method to get a subset of the audio > data: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Sound.html#extract() > > - Ryan > > >
Received on Monday, 28 February 2011 16:03:30 UTC