AudioTrack.WriteAsync Method

Definition

Overloads

WriteAsync(ByteBuffer, Int32, WriteMode)

C#
public System.Threading.Tasks.Task<int> WriteAsync (Java.Nio.ByteBuffer audioData, int sizeInBytes, Android.Media.WriteMode writeMode);

Parameters

audioData
ByteBuffer
sizeInBytes
Int32
writeMode
WriteMode

Returns

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

WriteAsync(Byte[], Int32, Int32)

C#
public System.Threading.Tasks.Task<int> WriteAsync (byte[] audioData, int offsetInBytes, int sizeInBytes);

Parameters

audioData
Byte[]
offsetInBytes
Int32
sizeInBytes
Int32

Returns

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

WriteAsync(Int16[], Int32, Int32)

C#
public System.Threading.Tasks.Task<int> WriteAsync (short[] audioData, int offsetInShorts, int sizeInShorts);

Parameters

audioData
Int16[]
offsetInShorts
Int32
sizeInShorts
Int32

Returns

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

WriteAsync(ByteBuffer, Int32, WriteMode, Int64)

C#
public System.Threading.Tasks.Task<int> WriteAsync (Java.Nio.ByteBuffer audioData, int sizeInBytes, Android.Media.WriteMode writeMode, long timestamp);

Parameters

audioData
ByteBuffer
sizeInBytes
Int32
writeMode
WriteMode
timestamp
Int64

Returns

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

WriteAsync(Byte[], Int32, Int32, WriteMode)

C#
public System.Threading.Tasks.Task<int> WriteAsync (byte[] audioData, int offsetInBytes, int sizeInBytes, Android.Media.WriteMode writeMode);

Parameters

audioData
Byte[]
offsetInBytes
Int32
sizeInBytes
Int32
writeMode
WriteMode

Returns

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

WriteAsync(Int16[], Int32, Int32, WriteMode)

C#
public System.Threading.Tasks.Task<int> WriteAsync (short[] audioData, int offsetInShorts, int sizeInShorts, Android.Media.WriteMode writeMode);

Parameters

audioData
Int16[]
offsetInShorts
Int32
sizeInShorts
Int32
writeMode
WriteMode

Returns

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35

WriteAsync(Single[], Int32, Int32, WriteMode)

C#
public System.Threading.Tasks.Task<int> WriteAsync (float[] audioData, int offsetInFloats, int sizeInFloats, Android.Media.WriteMode writeMode);

Parameters

audioData
Single[]
offsetInFloats
Int32
sizeInFloats
Int32
writeMode
WriteMode

Returns

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

.NET for Android .NET for Android API 35 and .NET for Android .NET for Android API 34
Product Versions
.NET for Android .NET for Android API 34, .NET for Android API 35