Language

WriteMode Enum

Definition

Enumerates values returned by the Blocking, and NonBlocking members and taken as a parameter of several methods of AudioTrack.

public enum WriteMode
type WriteMode = 
Inheritance
WriteMode

Fields

Name Value Description
Blocking 0

In streaming mode, the write operation normally blocks until all data has been queued for playback. It may return a short count if the track is stopped or paused or an I/O error occurs. In static buffer mode, the write mode is ignored. Use this value for the writeMode parameter in write(byte[], int, int, int), write(short[], int, int, int), write(float[], int, int, int), write(ByteBuffer,int,int), and write(ByteBuffer,int,int,long).

Android reference for android.media.AudioTrack.WRITE_BLOCKING.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

NonBlocking 1

In streaming mode, the write operation returns after queuing as much audio data for playback as possible without blocking. In static buffer mode, the write mode is ignored. Use this value for the writeMode parameter in write(byte[],int,int,int), write(short[], int, int, int), write(float[], int, int, int), write(ByteBuffer,int,int), and write(ByteBuffer,int,int,long).

Android reference for android.media.AudioTrack.WRITE_NON_BLOCKING.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to