Commit 434cfa7d authored by Raymond Toy's avatar Raymond Toy Committed by Commit Bot

Use correct unsigned long attributes in AudioBuffer

The length attribute was defined as a long instead of unsigned long.
We also note that channelIndex for getChannelData(),
copyFromChannel(), and copyToChannel() was declared to be a long
instead of unsigned long.  Fix those too.

Bug: 1059305
Change-Id: Ia57fc606e8943de56bb2943b00e19b8beaeb9642
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095212Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748698}
parent fbdf8056
......@@ -31,13 +31,20 @@
Exposed=Window
] interface AudioBuffer {
[RaisesException, Measure] constructor(AudioBufferOptions options);
readonly attribute long length; // in sample-frames
readonly attribute unsigned long length; // in sample-frames
readonly attribute double duration; // in seconds
readonly attribute float sampleRate; // in sample-frames per second
// Channel access
readonly attribute unsigned long numberOfChannels;
[HighEntropy, Measure, RaisesException] Float32Array getChannelData(unsigned long channelIndex);
[HighEntropy, Measure, RaisesException] void copyFromChannel(Float32Array destination, long channelNumber, optional unsigned long bufferOffset = 0);
[RaisesException] void copyToChannel(Float32Array source, long channelNumber, optional unsigned long bufferOffset = 0);
[HighEntropy, Measure, RaisesException] Float32Array getChannelData(
unsigned long channelIndex);
[HighEntropy, Measure, RaisesException] void copyFromChannel(
Float32Array destination,
unsigned long channelNumber,
optional unsigned long bufferOffset = 0);
[RaisesException] void copyToChannel(
Float32Array source,
unsigned long channelNumber,
optional unsigned long bufferOffset = 0);
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment