- From: Chris Rogers <crogers@google.com>
- Date: Wed, 5 Dec 2012 08:54:08 -0800
- To: Patrick Borgeat <patrick.borgeat@gmail.com>
- Cc: Ehsan Akhgari <ehsan@mozilla.com>, public-audio@w3.org
Received on Wednesday, 5 December 2012 16:54:36 UTC
On Tue, Dec 4, 2012 at 11:24 PM, Patrick Borgeat <patrick.borgeat@gmail.com>wrote: > Is there a way to circumvent this? For example if I don't want to decode > an audio file for playback but just to get the channelData to do some > calculations or something. createBuffer does sample rate conversion as well. > Not currently, but we could add an extra optional parameter to these methods. > > cheers, > Patrick > > > 2012/12/4 Chris Rogers <crogers@google.com> > >> Hi Ehsan, sorry the spec isn't clear about this. The intended behavior >> is for the implementation to resample the decoded audio data to the >> AudioContext sample-rate as part of the decodeAudioData() operation. This >> is so that we don't have to resample the data at playback time, which can >> get very expensive especially with several sources playing back at the same >> time. Sample-rate converting up-front allows us to use higher-quality >> sample-rate conversion algorithms, since it's easier to afford the >> expensive algorithms. > > >
Received on Wednesday, 5 December 2012 16:54:36 UTC