Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class MicrophoneSourceNode
Live captured audio as a graph source, the Codename One counterpart of the
Web Audio MediaStreamAudioSourceNode for a microphone. Created by
BaseAudioContext.createMicrophoneSource(AudioBuffer) over the
AudioBuffer a recorder fills when it is built with
MediaRecorderBuilder.redirectToAudioBuffer(true).
The node outputs one or two channels, as the capture delivers them (a
capture with more keeps the first two), resampled to the context’s rate.
It keeps its delay short: when the graph falls behind it drops the oldest
captured audio rather than fall further behind, and when capture stalls it
outputs silence. Call close() to detach it from the buffer.
Methods
public AudioBuffer getSource() | The buffer this node reads. |
public void close() | Stops listening to the capture buffer; the node outputs silence after what it already received. |
Inherited methods
Method details
getSource
public AudioBuffer getSource()Returns
close
public void close()