Package org.loboevolution.html.js.audio
Class AudioContextImpl
java.lang.Object
org.loboevolution.html.js.audio.AudioContextImpl
- All Implemented Interfaces:
AudioContext
,BaseAudioContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
The close() method of the AudioContext Interface closes the audio context, releasing any system audio resources that it uses.createBuffer
(int numberOfChannels, int length, float sampleRate) An AudioBuffer configured based on the specified options.The baseLatency read-only property of the AudioContext interface returns a double that represents the number of seconds of processing latency incurred by the AudioContext passing an audio buffer from the AudioDestinationNode — i.e. the end of the audio graph — into the host system's audio subsystem ready for playing.The outputLatency read-only property of the AudioContext Interface provides an estimation of the output latency of the current audio context.void
resume()
The resume() method of the AudioContext interface resumes the progression of time in an audio context that has previously been suspended.void
suspend()
The suspend() method of the AudioContext Interface suspends the progression of time in the audio context, temporarily halting audio hardware access and reducing CPU/battery usage in the process — this is useful if you want an application to power down the audio hardware when it will not be using an audio context for a while.
-
Constructor Details
-
AudioContextImpl
public AudioContextImpl()
-
-
Method Details
-
createBuffer
Description copied from interface:BaseAudioContext
An AudioBuffer configured based on the specified options.- Specified by:
createBuffer
in interfaceBaseAudioContext
- See Also:
-
getBaseLatency
Description copied from interface:AudioContext
The baseLatency read-only property of the AudioContext interface returns a double that represents the number of seconds of processing latency incurred by the AudioContext passing an audio buffer from the AudioDestinationNode — i.e. the end of the audio graph — into the host system's audio subsystem ready for playing.- Specified by:
getBaseLatency
in interfaceAudioContext
- See Also:
-
getOutputLatency
Description copied from interface:AudioContext
The outputLatency read-only property of the AudioContext Interface provides an estimation of the output latency of the current audio context.- Specified by:
getOutputLatency
in interfaceAudioContext
- See Also:
-
close
public void close()Description copied from interface:AudioContext
The close() method of the AudioContext Interface closes the audio context, releasing any system audio resources that it uses.- Specified by:
close
in interfaceAudioContext
- See Also:
-
resume
public void resume()Description copied from interface:AudioContext
The resume() method of the AudioContext interface resumes the progression of time in an audio context that has previously been suspended.- Specified by:
resume
in interfaceAudioContext
- See Also:
-
suspend
public void suspend()Description copied from interface:AudioContext
The suspend() method of the AudioContext Interface suspends the progression of time in the audio context, temporarily halting audio hardware access and reducing CPU/battery usage in the process — this is useful if you want an application to power down the audio hardware when it will not be using an audio context for a while.- Specified by:
suspend
in interfaceAudioContext
- See Also:
-