Package org.loboevolution.html.js.audio
Class AudioContextImpl
java.lang.Object
org.loboevolution.html.js.audio.AudioContextImpl
- All Implemented Interfaces:
AudioContext,BaseAudioContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()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.voidresume()The resume() method of the AudioContext interface resumes the progression of time in an audio context that has previously been suspended.voidsuspend()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:BaseAudioContextAn AudioBuffer configured based on the specified options.- Specified by:
createBufferin interfaceBaseAudioContext- See Also:
-
getBaseLatency
Description copied from interface:AudioContextThe 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:
getBaseLatencyin interfaceAudioContext- See Also:
-
getOutputLatency
Description copied from interface:AudioContextThe outputLatency read-only property of the AudioContext Interface provides an estimation of the output latency of the current audio context.- Specified by:
getOutputLatencyin interfaceAudioContext- See Also:
-
close
public void close()Description copied from interface:AudioContextThe close() method of the AudioContext Interface closes the audio context, releasing any system audio resources that it uses.- Specified by:
closein interfaceAudioContext- See Also:
-
resume
public void resume()Description copied from interface:AudioContextThe resume() method of the AudioContext interface resumes the progression of time in an audio context that has previously been suspended.- Specified by:
resumein interfaceAudioContext- See Also:
-
suspend
public void suspend()Description copied from interface:AudioContextThe 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:
suspendin interfaceAudioContext- See Also:
-