Android.Media.AudioTrack Members

The members of Android.Media.AudioTrack are listed below.

See Also: Inherited members from Java.Lang.Object

Public Constructors

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
ErrorTrackStatus (-1). Denotes a generic operation failure.
const
ErrorBadValueTrackStatus (-2). Denotes a failure due to the use of an invalid value.
const
ErrorInvalidOperationTrackStatus (-3). Denotes a failure due to the improper use of a method.
const
SuccessTrackStatus (0). Denotes a successful operation.

Public Properties

[read-only]
AudioFormatEncoding. Returns the configured audio data format.
[read-only]
AudioSessionIdint. Returns the audio session ID.
[read-only]
ChannelConfigurationChannelOut. Returns the configured channel configuration.
[read-only]
ChannelCountint. Returns the configured number of channels.
[read-only]
static
MaxVolumefloat. Returns the maximum gain value, which is greater than or equal to 1.
[read-only]
static
MinVolumefloat. Returns the minimum gain value, which is the constant 0.
[read-only]
NotificationMarkerPositionint. Returns marker position expressed in frames.
[read-only]
PlaybackHeadPositionint. Returns the playback head position expressed in frames.
[read-only]
PlaybackRateint. Returns the current playback rate in Hz.
[read-only]
PlayStatePlayState. Returns the playback state of the AudioTrack instance.
[read-only]
PositionNotificationPeriodint. Returns the notification update period expressed in frames.
[read-only]
SampleRateint. Returns the configured audio data sample rate in Hz
[read-only]
StateAudioTrackState. Returns the state of the AudioTrack instance.
[read-only]
StreamTypeStream. Returns the type of audio stream this AudioTrack is configured for.

Protected Properties

[read-only]
NativeFrameCountint. Returns the "native frame count", derived from the bufferSizeInBytes specified at creation time and converted to frame units.
[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

AttachAuxEffect(int) : TrackStatus
Attaches an auxiliary effect to the audio track.
Flush()
Flushes the audio data currently queued for playback.
static
GetMinBufferSize(int, ChannelOut, Encoding) : int
Returns the minimum buffer size required for the successful creation of an AudioTrack object to be created in the AudioTrack.MODE_STREAM mode.
static
GetNativeOutputSampleRate(Stream) : int
Returns the output sample rate in Hz for the specified stream type.
GetTimestamp(AudioTimestamp) : bool
Poll for a timestamp on demand.
Pause()
Pauses the playback of the audio data.
Play()
Starts playing an AudioTrack.
Release()
Releases the native AudioTrack resources.
ReloadStaticData() : TrackStatus
Notifies the native resource to reuse the audio data already loaded in the native layer, that is to rewind to start of buffer.
SetAuxEffectSendLevel(float) : TrackStatus
Sets the send level of the audio track to the attached auxiliary effect AudioTrack.AttachAuxEffect(int).
SetLoopPoints(int, int, int) : TrackStatus
Sets the loop points and the loop count.
SetNotificationMarkerPosition(int) : TrackStatus
Sets the position of the notification marker.
SetPlaybackHeadPosition(int) : TrackStatus
Sets the playback head position.
SetPlaybackPositionUpdateListener(AudioTrack.IOnPlaybackPositionUpdateListener)
Sets the listener the AudioTrack notifies when a previously set marker is reached or for each periodic playback head position update.
SetPlaybackPositionUpdateListener(AudioTrack.IOnPlaybackPositionUpdateListener, Android.OS.Handler)
Sets the listener the AudioTrack notifies when a previously set marker is reached or for each periodic playback head position update.
SetPlaybackRate(int) : int
Sets the playback sample rate for this track.
SetPositionNotificationPeriod(int) : TrackStatus
Sets the period for the periodic notification event.
SetStereoVolume(float, float) : TrackStatus
Sets the specified left and right output gain values on the AudioTrack.
SetVolume(float) : TrackStatus
Sets the specified output gain value on all channels of this track.
Stop()
Stops playing the audio data.
Write(Java.Nio.ByteBuffer, int, WriteMode) : int
Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode).
Write(byte[], int, int) : int
Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode).
Write(short[], int, int) : int
Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode).
Write(float[], int, int, WriteMode) : int
Writes the audio data to the audio sink for playback (streaming mode), or copies audio data for later playback (static buffer mode).
WriteAsync(Java.Nio.ByteBuffer, int, WriteMode) : System.Threading.Tasks.Task<int>
Documentation for this section has not yet been entered.
WriteAsync(byte[], int, int) : System.Threading.Tasks.Task<int>
Documentation for this section has not yet been entered.
WriteAsync(short[], int, int) : System.Threading.Tasks.Task<int>
Documentation for this section has not yet been entered.
WriteAsync(float[], int, int, WriteMode) : System.Threading.Tasks.Task<int>
Documentation for this section has not yet been entered.

Protected Methods

SetState(int)
Sets the initialization state of the instance.

Public Events

MarkerReachedDocumentation for this section has not yet been entered.
PeriodicNotificationDocumentation for this section has not yet been entered.