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

Commit 96567e21 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "Unhide AudioTrack.write() method for non-blocking and ByteBuffer"

parents 5b554f01 a713814f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -13584,6 +13584,7 @@ package android.media {
    method public void stop() throws java.lang.IllegalStateException;
    method public int write(byte[], int, int);
    method public int write(short[], int, int);
    method public int write(java.nio.ByteBuffer, int, int);
    field public static final int ERROR = -1; // 0xffffffff
    field public static final int ERROR_BAD_VALUE = -2; // 0xfffffffe
    field public static final int ERROR_INVALID_OPERATION = -3; // 0xfffffffd
@@ -13596,6 +13597,8 @@ package android.media {
    field public static final int STATE_NO_STATIC_DATA = 2; // 0x2
    field public static final int STATE_UNINITIALIZED = 0; // 0x0
    field public static final int SUCCESS = 0; // 0x0
    field public static final int WRITE_BLOCKING = 0; // 0x0
    field public static final int WRITE_NON_BLOCKING = 1; // 0x1
  }
  public static abstract interface AudioTrack.OnPlaybackPositionUpdateListener {
+0 −3
Original line number Diff line number Diff line
@@ -172,13 +172,11 @@ public class AudioTrack
    public @interface WriteMode {}

    /**
     * @hide CANDIDATE FOR PUBLIC API
     * The write mode indicating the write operation will block until all data has been written,
     * to be used in {@link #write(ByteBuffer, int, int, int)}.
     */
    public final static int WRITE_BLOCKING = 0;
    /**
     * @hide CANDIDATE FOR PUBLIC API
     * The write mode indicating the write operation will return immediately after
     * queuing as much audio data for playback as possible without blocking, to be used in
     * {@link #write(ByteBuffer, int, int, int)}.
@@ -1220,7 +1218,6 @@ public class AudioTrack


    /**
     * @hide CANDIDATE FOR PUBLIC API
     * Writes the audio data to the audio sink for playback (streaming mode),
     * or copies audio data for later playback (static buffer mode).
     * In static buffer mode, copies the data to the buffer starting at its 0 offset, and the write