Android.Media.AudioTrack.Write Method
Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode).

Syntax

[Android.Runtime.Register("write", "([SII)I", "GetWrite_arraySIIHandler")]
public virtual int Write (short[] audioData, int offsetInShorts, int sizeInShorts)

Parameters

audioData
the array that holds the data to play.
offsetInShorts
the offset expressed in shorts in audioData where the data to play starts.
sizeInShorts
the number of shorts to read in audioData after the offset.

Returns

Documentation for this section has not yet been entered.

Remarks

Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode). In streaming mode, will block until all data has been written to the audio sink. In static buffer mode, copies the data to the buffer starting at offset 0. Note that the actual playback of this data might occur after this function returns. This function is thread safe with respect to AudioTrack.Stop calls, in which case all of the specified data might not be written to the audio sink.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 3