Interface ShadowAudioRecord.AudioRecordSource

    • Method Detail

      • readInByteArray

        default int readInByteArray​(byte[] audioData,
                                    int offsetInBytes,
                                    int sizeInBytes,
                                    boolean isBlocking)
        Returns:
        Either a non-negative value representing number of bytes that have been written from the offset or a negative error code.
      • readInFloatArray

        default int readInFloatArray​(float[] audioData,
                                     int offsetInFloats,
                                     int sizeInFloats,
                                     boolean isBlocking)
        Provides backing data for AudioRecord.read(float[], int, int, int).
        Returns:
        Either a non-negative value representing number of bytes that have been written from the offset or a negative error code.
      • readInDirectBuffer

        default int readInDirectBuffer​(ByteBuffer buffer,
                                       int sizeInBytes,
                                       boolean isBlocking)
        Returns:
        Either a non-negative value representing number of bytes that have been written from the offset or a negative error code. Note any position/limit changes to the buffer will not be visible to the caller of the AudioRecord methods.