W3C home > Mailing lists > Public > public-audio@w3.org > April to June 2012

Audio-ISSUE-48 (AudioBufferSimpl): AudioBuffer simplification [Web Audio API]

From: Audio Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Tue, 15 May 2012 15:02:21 +0000
Message-Id: <E1SUJGX-0002NN-LI@tibor.w3.org>
To: public-audio@w3.org
Audio-ISSUE-48 (AudioBufferSimpl): AudioBuffer simplification [Web Audio API]

http://www.w3.org/2011/audio/track/issues/48

Raised by: Philip J├Ągenstedt
On product: Web Audio API

The duration attribute fills no purpose, as it can be calculated trivially from sampleRate and length.

In fact, the interface can be reduced to:

    interface AudioBuffer {
        readonly attribute float sampleRate;
        Float32Array[] data;
    }

The number of channels is data.length and the number of samples is data[0].length.

The name data was picked for consistency with the ImageData interface from the 2D canvas context.
Received on Tuesday, 15 May 2012 15:02:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 15 May 2012 15:02:28 GMT