Interface AudioRenderCallback


public interface AudioRenderCallback
Supplies the samples an AudioOutputPeer plays. Implemented by AudioContext; ports call it from their audio thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    render(float[] interleaved, int frames, int channels)
    Fills interleaved with frames frames of channels interleaved float samples in the range -1 to 1.
  • Method Details

    • render

      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: the buffer to fill, at least frames * channels long

      • frames: the number of frames wanted

      • channels: the number of interleaved channels