Android.Media.AudioTrack.GetMinBufferSize Method
Returns the minimum buffer size required for the successful creation of an AudioTrack object to be created in the AudioTrack.MODE_STREAM mode.

Syntax

[Android.Runtime.Register("getMinBufferSize", "(III)I", "")]
public static int GetMinBufferSize (int sampleRateInHz, [Android.Runtime.GeneratedEnum] ChannelOut channelConfig, [Android.Runtime.GeneratedEnum] Encoding audioFormat)

Parameters

sampleRateInHz
the source sample rate expressed in Hz.
channelConfig
describes the configuration of the audio channels. See AudioFormat.CHANNEL_OUT_MONO and AudioFormat.CHANNEL_OUT_STEREO
audioFormat
the format in which the audio data is represented. See AudioFormat.ENCODING_PCM_16BIT and AudioFormat.ENCODING_PCM_8BIT, and AudioFormat.ENCODING_PCM_FLOAT.

Returns

Documentation for this section has not yet been entered.

Remarks

Returns the minimum buffer size required for the successful creation of an AudioTrack object to be created in the AudioTrack.MODE_STREAM mode. Note that this size doesn't guarantee a smooth playback under load, and higher values should be chosen according to the expected frequency at which the buffer will be refilled with additional data to play. For example, if you intend to dynamically set the source sample rate of an AudioTrack to a higher value than the initial source sample rate, be sure to configure the buffer size based on the highest planned sample rate.

[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