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

interleaved float[]
the buffer to fill, at least frames * channels long
frames int
the number of frames wanted
channels int
the number of interleaved channels