Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public interface AudioRenderCallback
Supplies the samples an
AudioOutputPeer plays. Implemented by
AudioContext; ports call it from their audio thread.Methods
public abstract void render(float[] interleaved, int frames, int channels) | Fills interleaved with frames frames of channels interleaved float samples in the range -1 to 1. Called on the port’s audio thread; it must return quickly and never block. |
Method details
render
public abstract void render(float[] interleaved, int frames, int channels)Fills
interleaved with frames frames of channels interleaved float
samples in the range -1 to 1. Called on the port’s audio thread; it must
return quickly and never block.Parameters
interleavedfloat[]- the buffer to fill, at least
frames * channelslong framesint- the number of frames wanted
channelsint- the number of interleaved channels