AudioTrack AudioTrack Constructors

Definition

Overloads

AudioTrack(IntPtr, JniHandleOwnership) AudioTrack(IntPtr, JniHandleOwnership)

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

AudioTrack(AudioAttributes, AudioFormat, Int32, AudioTrackMode, Int32) AudioTrack(AudioAttributes, AudioFormat, Int32, AudioTrackMode, Int32)

Class constructor with AudioAttributes and AudioFormat.

AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode) AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode)

Class constructor.

AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode) AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode)

Class constructor.

AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode, Int32) AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode, Int32)

Class constructor with audio session.

AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode, Int32) AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode, Int32)

Class constructor with audio session.

AudioTrack(IntPtr, JniHandleOwnership) AudioTrack(IntPtr, JniHandleOwnership)

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

protected AudioTrack (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Media.AudioTrack : nativeint * Android.Runtime.JniHandleOwnership -> Android.Media.AudioTrack

Parameters

javaReference
IntPtr IntPtr

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

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.

AudioTrack(AudioAttributes, AudioFormat, Int32, AudioTrackMode, Int32) AudioTrack(AudioAttributes, AudioFormat, Int32, AudioTrackMode, Int32)

Class constructor with AudioAttributes and AudioFormat.

[Android.Runtime.Register(".ctor", "(Landroid/media/AudioAttributes;Landroid/media/AudioFormat;III)V", "", ApiSince=21)]
public AudioTrack (Android.Media.AudioAttributes attributes, Android.Media.AudioFormat format, int bufferSizeInBytes, Android.Media.AudioTrackMode mode, int sessionId);
new Android.Media.AudioTrack : Android.Media.AudioAttributes * Android.Media.AudioFormat * int * Android.Media.AudioTrackMode * int -> Android.Media.AudioTrack

Parameters

bufferSizeInBytes
Int32 Int32
sessionId
Int32 Int32

Exceptions

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.

AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode) AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode)

Warning

This API is now obsolete.

Class constructor.

[System.Obsolete("ChannelConfiguration is obsolete. Please use another overload with ChannelOut instead")]
public AudioTrack (Android.Media.Stream streamType, int sampleRateInHz, Android.Media.ChannelConfiguration channelConfig, Android.Media.Encoding audioFormat, int bufferSizeInBytes, Android.Media.AudioTrackMode mode);
new Android.Media.AudioTrack : Android.Media.Stream * int * Android.Media.ChannelConfiguration * Android.Media.Encoding * int * Android.Media.AudioTrackMode -> Android.Media.AudioTrack

Parameters

streamType
Stream Stream
sampleRateInHz
Int32 Int32
audioFormat
Encoding Encoding
bufferSizeInBytes
Int32 Int32

Exceptions

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.

AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode) AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode)

Warning

This API is now obsolete.

Class constructor.

[Android.Runtime.Register(".ctor", "(IIIIII)V", "")]
[System.Obsolete("deprecated")]
public AudioTrack (Android.Media.Stream streamType, int sampleRateInHz, Android.Media.ChannelOut channelConfig, Android.Media.Encoding audioFormat, int bufferSizeInBytes, Android.Media.AudioTrackMode mode);
new Android.Media.AudioTrack : Android.Media.Stream * int * Android.Media.ChannelOut * Android.Media.Encoding * int * Android.Media.AudioTrackMode -> Android.Media.AudioTrack

Parameters

streamType
Stream Stream
sampleRateInHz
Int32 Int32
channelConfig
ChannelOut ChannelOut
audioFormat
Encoding Encoding
bufferSizeInBytes
Int32 Int32

Exceptions

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.

AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode, Int32) AudioTrack(Stream, Int32, ChannelConfiguration, Encoding, Int32, AudioTrackMode, Int32)

Warning

This API is now obsolete.

Class constructor with audio session.

[System.Obsolete("ChannelConfiguration is obsolete. Please use another overload with ChannelOut instead")]
public AudioTrack (Android.Media.Stream streamType, int sampleRateInHz, Android.Media.ChannelConfiguration channelConfig, Android.Media.Encoding audioFormat, int bufferSizeInBytes, Android.Media.AudioTrackMode mode, int sessionId);
new Android.Media.AudioTrack : Android.Media.Stream * int * Android.Media.ChannelConfiguration * Android.Media.Encoding * int * Android.Media.AudioTrackMode * int -> Android.Media.AudioTrack

Parameters

streamType
Stream Stream
sampleRateInHz
Int32 Int32
audioFormat
Encoding Encoding
bufferSizeInBytes
Int32 Int32
sessionId
Int32 Int32

Exceptions

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.

AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode, Int32) AudioTrack(Stream, Int32, ChannelOut, Encoding, Int32, AudioTrackMode, Int32)

Warning

This API is now obsolete.

Class constructor with audio session.

[Android.Runtime.Register(".ctor", "(IIIIIII)V", "", ApiSince=9)]
[System.Obsolete("deprecated")]
public AudioTrack (Android.Media.Stream streamType, int sampleRateInHz, Android.Media.ChannelOut channelConfig, Android.Media.Encoding audioFormat, int bufferSizeInBytes, Android.Media.AudioTrackMode mode, int sessionId);
new Android.Media.AudioTrack : Android.Media.Stream * int * Android.Media.ChannelOut * Android.Media.Encoding * int * Android.Media.AudioTrackMode * int -> Android.Media.AudioTrack

Parameters

streamType
Stream Stream
sampleRateInHz
Int32 Int32
channelConfig
ChannelOut ChannelOut
audioFormat
Encoding Encoding
bufferSizeInBytes
Int32 Int32
sessionId
Int32 Int32

Exceptions

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