Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b368585 authored by jiabin's avatar jiabin Committed by Jiabin Huang
Browse files

Update doc for AudioRecord.read.

When ByteBuffer is used, the position and limit are ignored.

Bug: 436415086
Test: TH
Flag: DOCS_ONLY
Change-Id: I1f3c5e50a27f791136304d99f0702d72465b2d79
parent 60fb539c
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1768,7 +1768,9 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
     * The representation of the data in the buffer will depend on the format specified in
     * the AudioRecord constructor, and will be native endian.
     * @param audioBuffer the direct buffer to which the recorded audio data is written.
     * Data is written to audioBuffer.position().
     *    Data is written to the beginning of the byte buffer. Importantly, this
     *    method ignores the {@link java.nio.Buffer#position()} and
     *    {@link java.nio.Buffer#limit()} properties.
     * @param sizeInBytes the number of requested bytes. It is recommended but not enforced
     *    that the number of bytes requested be a multiple of the frame size (sample size in
     *    bytes multiplied by the channel count).
@@ -1796,7 +1798,9 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection,
     * The representation of the data in the buffer will depend on the format specified in
     * the AudioRecord constructor, and will be native endian.
     * @param audioBuffer the direct buffer to which the recorded audio data is written.
     * Data is written to audioBuffer.position().
     *    Data is written to the beginning of the byte buffer. Importantly, this
     *    method ignores the {@link java.nio.Buffer#position()} and
     *    {@link java.nio.Buffer#limit()} properties.
     * @param sizeInBytes the number of requested bytes. It is recommended but not enforced
     *    that the number of bytes requested be a multiple of the frame size (sample size in
     *    bytes multiplied by the channel count).