Package org.loboevolution.audio
Interface AudioBuffer
public interface AudioBuffer
The AudioBuffer interface represents a short audio asset residing in memory, created from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). Once put into an AudioBuffer, the audio can then be played by being passed into an AudioBufferSourceNode.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondouble
duration()
A double.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
An integer.float
A floating-point value indicating the current sample rate of the buffers data, in samples per second.
-
Method Details
-
duration
double duration()A double.- See Also:
-
length
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.- See Also:
-
numberOfChannels
int numberOfChannels()An integer.- See Also:
-
sampleRate
float sampleRate()A floating-point value indicating the current sample rate of the buffers data, in samples per second.- See Also:
-