Jaa


AudioFrame Class

Definition

Represents a single frame of audio data.

public ref class AudioFrame sealed : IClosable
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.IAudioFrameFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class AudioFrame final : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Media.IAudioFrameFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class AudioFrame final : IClosable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.IAudioFrameFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class AudioFrame : System.IDisposable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Media.IAudioFrameFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class AudioFrame : System.IDisposable
function AudioFrame(capacity)
Public NotInheritable Class AudioFrame
Implements IDisposable
Inheritance
Object Platform::Object IInspectable AudioFrame
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

An audio frame typically contains multiple audio samples. Access the audio data by calling LockBuffer which returns an AudioBuffer.

Constructors

AudioFrame(UInt32)

Initializes a new instance of the AudioFrame class.

Properties

Duration

Gets or sets the duration of the audio frame.

ExtendedProperties

Gets the extended property set which enables getting and setting properties on the AudioFrame.

IsDiscontinuous

Gets or sets a value that indicates whether an audio frame is the first frame after a gap in the stream.

IsReadOnly

Gets a value indicating whether the audio frame is read-only.

RelativeTime

Gets or sets the relative time of the frame within the audio stream.

SystemRelativeTime

Gets or sets a timestamp that is relative to the system and is correlatable across multiple media sources on the same device.

Type

Gets a string indicating the type of audio data the audio frame contains.

Methods

Close()

Disposes of the object and associated resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

LockBuffer(AudioBufferAccessMode)

Gets a AudioBuffer object that allows you to operate directly on the frame's audio data.

Applies to

See also