Re: decodeAudioData and resampling

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.

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 07:33:28 UTC