Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public abstract class AudioScheduledSourceNode

  1. Object
  2. AudioNode
  3. AudioScheduledSourceNode

Known subtypesAudioBufferSourceNode, ConstantSourceNode, OscillatorNode

A source node that is started and stopped at scheduled times, the Web Audio AudioScheduledSourceNode. A source can be started only once; create a new one to play again.

Methods

public void start()Starts playing now.
public void start(double when)Starts playing at when; a time already past starts at once.
public void stop()Stops playing now.
public void stop(double when)Stops playing at when.
public void setOnEnded(Runnable onEnded)Sets what runs when the source stops playing, either because it reached its stop time or because it ran out of audio.

Inherited methods

Method details

start

public void start()
Starts playing now.

start

public void start(double when)
Starts playing at when; a time already past starts at once.

Parameters

when double
context time in seconds

stop

public void stop()
Stops playing now.

stop

public void stop(double when)
Stops playing at when. Calling it again replaces the earlier stop time.

Parameters

when double
context time in seconds

setOnEnded

public void setOnEnded(Runnable onEnded)
Sets what runs when the source stops playing, either because it reached its stop time or because it ran out of audio. It runs on the EDT for an AudioContext, and on the rendering thread, between render quanta, for an OfflineAudioContext.

Parameters

onEnded Runnable
the callback, or null