@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="AudioBuffer")
public class AudioBuffer
extends JsObject
| Constructor and Description |
|---|
AudioBuffer(AudioBufferOptions options)
The AudioBuffer constructor of the Web Audio API creates a new AudioBuffer object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyFromChannel(Float32Array destination,
int channelNumber)
The copyFromChannel() method of the AudioBuffer interface copies the audio sample data from the specified channel of the AudioBuffer to a specified Float32Array.
|
void |
copyFromChannel(Float32Array destination,
int channelNumber,
int bufferOffset)
The copyFromChannel() method of the AudioBuffer interface copies the audio sample data from the specified channel of the AudioBuffer to a specified Float32Array.
|
void |
copyToChannel(Float32Array source,
int channelNumber)
The copyToChannel() method of the AudioBuffer interface copies the samples to the specified channel of the AudioBuffer, from the source array.
|
void |
copyToChannel(Float32Array source,
int channelNumber,
int bufferOffset)
The copyToChannel() method of the AudioBuffer interface copies the samples to the specified channel of the AudioBuffer, from the source array.
|
double |
duration()
A double.
|
@JsNonNull Float32Array |
getChannelData(int channel)
The getChannelData() method of the AudioBuffer Interface returns a Float32Array containing the PCM data associated with the channel, defined by the channel parameter (with 0 representing the first channel).
|
int |
length()
The length property of the AudioBuffer interface returns an integer representing the length, in sample-frames, of the PCM data stored in the buffer.
|
int |
numberOfChannels()
An integer.
|
float |
sampleRate()
A floating-point value indicating the current sample rate of the buffers data, in samples per second.
|
assign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic AudioBuffer(@Nonnull
AudioBufferOptions options)
@JsProperty(name="duration") public double duration()
@JsProperty(name="length") public int length()
@JsProperty(name="numberOfChannels") public int numberOfChannels()
@JsProperty(name="sampleRate") public float sampleRate()
public void copyFromChannel(@Nonnull
Float32Array destination,
int channelNumber,
int bufferOffset)
public void copyFromChannel(@Nonnull
Float32Array destination,
int channelNumber)
public void copyToChannel(@Nonnull
Float32Array source,
int channelNumber,
int bufferOffset)
public void copyToChannel(@Nonnull
Float32Array source,
int channelNumber)
public @JsNonNull Float32Array getChannelData(int channel)