Lines Matching refs:write

48  *  {@link #write(byte[], int, int)}, {@link #write(short[], int, int)},
49 * and {@link #write(float[], int, int, int)} methods.
53 * one of the {@code write()} methods. These are blocking and return when the data has been
199 * The write mode indicating the write operation will block until all data has been written,
201 * {@link #write(byte[], int, int, int)}, {@link #write(short[], int, int, int)},
202 * {@link #write(float[], int, int, int)}, {@link #write(ByteBuffer, int, int)}, and
203 * {@link #write(ByteBuffer, int, int, long)}.
208 * The write mode indicating the write operation will return immediately after
211 * {@link #write(ByteBuffer, int, int)}, {@link #write(short[], int, int, int)},
212 * {@link #write(float[], int, int, int)}, {@link #write(ByteBuffer, int, int)}, and
213 * {@link #write(ByteBuffer, int, int, long)}.
302 * HW_AV_SYNC track audio data bytes remaining to write after current AV sync header
356 * determines the minimum frequency to write
409 * determines the minimum frequency to write
411 * You can write data into this buffer in smaller chunks than this size.
453 * determines the minimum frequency to write
685 * (see {@link AudioTrack#MODE_STREAM}, you can write data into this buffer in smaller
1143 * <p> A write to this AudioTrack will not fill the buffer beyond this limit.
1144 * If a blocking write is used then the write will block until the data
1252 * Returns the number of underrun occurrences in the application-level write buffer
1254 * An underrun occurs if the application does not write audio
1719 * the write methods ({@link #write(byte[], int, int)}, {@link #write(byte[], int, int, int)},
1720 * {@link #write(short[], int, int)}, {@link #write(short[], int, int, int)},
1721 * {@link #write(float[], int, int, int)}, or {@link #write(ByteBuffer, int, int)}) prior to
1726 * If you don't call write() first, or if you call write() but with an insufficient amount of
1732 * the track underruns due to failure to call write() in a timely manner with sufficient data.
1734 * by writing data until the write() method returns a short transfer count.
1806 * is available for a subsequent write.
1807 * For example, a call to {@link #write(byte[], int, int)} with <code>sizeInBytes</code>
1828 * In streaming mode, the write will normally block until all the data has been enqueued for
1830 * on entry, or another thread interrupts the write by calling stop or pause, or an I/O error
1831 * occurs during the write, then the write may return a short transfer count.
1837 * @param offsetInBytes the offset expressed in bytes in audioData where the data to write
1840 * @param sizeInBytes the number of bytes to write in audioData after the offset.
1850 * successfully transferred. In this case, the error is returned at the next write()</li>
1853 * This is equivalent to {@link #write(byte[], int, int, int)} with <code>writeMode</code>
1856 public int write(@NonNull byte[] audioData, int offsetInBytes, int sizeInBytes) {
1857 return write(audioData, offsetInBytes, sizeInBytes, WRITE_BLOCKING);
1867 * In streaming mode, the blocking behavior depends on the write mode. If the write mode is
1868 * {@link #WRITE_BLOCKING}, the write will normally block until all the data has been enqueued
1869 * for playback, and will return a full transfer count. However, if the write mode is
1871 * interrupts the write by calling stop or pause, or an I/O error
1872 * occurs during the write, then the write may return a short transfer count.
1875 * and the write mode is ignored.
1879 * @param offsetInBytes the offset expressed in bytes in audioData where the data to write
1882 * @param sizeInBytes the number of bytes to write in audioData after the offset.
1886 * <br>With {@link #WRITE_BLOCKING}, the write will block until all data has been written
1888 * <br>With {@link #WRITE_NON_BLOCKING}, the write will return immediately after
1898 * successfully transferred. In this case, the error is returned at the next write()</li>
1902 public int write(@NonNull byte[] audioData, int offsetInBytes, int sizeInBytes,
1910 Log.e(TAG, "AudioTrack.write() called with invalid blocking mode");
1939 * In streaming mode, the write will normally block until all the data has been enqueued for
1941 * on entry, or another thread interrupts the write by calling stop or pause, or an I/O error
1942 * occurs during the write, then the write may return a short transfer count.
1961 * successfully transferred. In this case, the error is returned at the next write()</li>
1964 * This is equivalent to {@link #write(short[], int, int, int)} with <code>writeMode</code>
1967 public int write(@NonNull short[] audioData, int offsetInShorts, int sizeInShorts) {
1968 return write(audioData, offsetInShorts, sizeInShorts, WRITE_BLOCKING);
1977 * In streaming mode, the blocking behavior depends on the write mode. If the write mode is
1978 * {@link #WRITE_BLOCKING}, the write will normally block until all the data has been enqueued
1979 * for playback, and will return a full transfer count. However, if the write mode is
1981 * interrupts the write by calling stop or pause, or an I/O error
1982 * occurs during the write, then the write may return a short transfer count.
1987 * @param audioData the array that holds the data to write.
1988 * @param offsetInShorts the offset expressed in shorts in audioData where the data to write
1995 * <br>With {@link #WRITE_BLOCKING}, the write will block until all data has been written
1997 * <br>With {@link #WRITE_NON_BLOCKING}, the write will return immediately after
2007 * successfully transferred. In this case, the error is returned at the next write()</li>
2011 public int write(@NonNull short[] audioData, int offsetInShorts, int sizeInShorts,
2019 Log.e(TAG, "AudioTrack.write() called with invalid blocking mode");
2048 * In streaming mode, the blocking behavior depends on the write mode. If the write mode is
2049 * {@link #WRITE_BLOCKING}, the write will normally block until all the data has been enqueued
2050 * for playback, and will return a full transfer count. However, if the write mode is
2052 * interrupts the write by calling stop or pause, or an I/O error
2053 * occurs during the write, then the write may return a short transfer count.
2056 * and the write mode is ignored.
2059 * @param audioData the array that holds the data to write.
2070 * in audioData where the data to write starts.
2072 * @param sizeInFloats the number of floats to write in audioData after the offset.
2076 * <br>With {@link #WRITE_BLOCKING}, the write will block until all data has been written
2078 * <br>With {@link #WRITE_NON_BLOCKING}, the write will return immediately after
2088 * successfully transferred. In this case, the error is returned at the next write()</li>
2092 public int write(@NonNull float[] audioData, int offsetInFloats, int sizeInFloats,
2096 Log.e(TAG, "AudioTrack.write() called in invalid state STATE_UNINITIALIZED");
2101 Log.e(TAG, "AudioTrack.write(float[] ...) requires format ENCODING_PCM_FLOAT");
2106 Log.e(TAG, "AudioTrack.write() called with invalid blocking mode");
2113 Log.e(TAG, "AudioTrack.write() called with invalid array, offset, or size");
2136 * In streaming mode, the blocking behavior depends on the write mode. If the write mode is
2137 * {@link #WRITE_BLOCKING}, the write will normally block until all the data has been enqueued
2138 * for playback, and will return a full transfer count. However, if the write mode is
2140 * interrupts the write by calling stop or pause, or an I/O error
2141 * occurs during the write, then the write may return a short transfer count.
2144 * and the write mode is ignored.
2147 * @param audioData the buffer that holds the data to write, starting at the position reported
2152 * @param sizeInBytes number of bytes to write. It is recommended but not enforced
2158 * <BR>With {@link #WRITE_BLOCKING}, the write will block until all data has been written
2160 * <BR>With {@link #WRITE_NON_BLOCKING}, the write will return immediately after
2169 * successfully transferred. In this case, the error is returned at the next write()</li>
2173 public int write(@NonNull ByteBuffer audioData, int sizeInBytes,
2177 Log.e(TAG, "AudioTrack.write() called in invalid state STATE_UNINITIALIZED");
2182 Log.e(TAG, "AudioTrack.write() called with invalid blocking mode");
2187 Log.e(TAG, "AudioTrack.write() called with invalid size (" + sizeInBytes + ") value");
2219 * The blocking behavior will depend on the write mode.
2220 * @param audioData the buffer that holds the data to write, starting at the position reported
2225 * @param sizeInBytes number of bytes to write. It is recommended but not enforced
2230 * <BR>With {@link #WRITE_BLOCKING}, the write will block until all data has been written
2232 * <BR>With {@link #WRITE_NON_BLOCKING}, the write will return immediately after
2242 * successfully transferred. In this case, the error is returned at the next write()</li>
2246 public int write(@NonNull ByteBuffer audioData, int sizeInBytes,
2250 Log.e(TAG, "AudioTrack.write() called in invalid state STATE_UNINITIALIZED");
2255 Log.e(TAG, "AudioTrack.write() called with invalid blocking mode");
2260 Log.e(TAG, "AudioTrack.write() with timestamp called for non-streaming mode track");
2265 Log.d(TAG, "AudioTrack.write() called on a regular AudioTrack. Ignoring pts...");
2266 return write(audioData, sizeInBytes, writeMode);
2270 Log.e(TAG, "AudioTrack.write() called with invalid size (" + sizeInBytes + ") value");
2285 // write timestamp header if not completely written already
2288 ret = write(mAvSyncHeader, mAvSyncHeader.remaining(), writeMode);
2290 Log.e(TAG, "AudioTrack.write() could not write timestamp header!");
2296 Log.v(TAG, "AudioTrack.write() partial timestamp header written.");
2301 // write audio data
2303 ret = write(audioData, sizeToWrite, writeMode);
2305 Log.e(TAG, "AudioTrack.write() could not write audio data!");