AudioFrame AudioFrame AudioFrame AudioFrame AudioFrame Class

Definition

Represents a single frame of audio data.

public : sealed class AudioFrame : IClosable, IAudioFrame, IMediaFrame
struct winrt::Windows::Media::AudioFrame : IClosable, IAudioFrame, IMediaFrame
public sealed class AudioFrame : IDisposable, IAudioFrame, IMediaFrame
Public NotInheritable Class AudioFrame Implements IDisposable, IAudioFrame, IMediaFrame
var audioFrame = new audioFrame(capacity);
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

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

Constructors

AudioFrame(UInt32) AudioFrame(UInt32) AudioFrame(UInt32) AudioFrame(UInt32) AudioFrame(UInt32)

Initializes a new instance of the AudioFrame class.

Properties

Duration Duration Duration Duration Duration

Gets or sets the duration of the audio frame.

ExtendedProperties ExtendedProperties ExtendedProperties ExtendedProperties ExtendedProperties

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

IsDiscontinuous IsDiscontinuous IsDiscontinuous IsDiscontinuous IsDiscontinuous

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

IsReadOnly IsReadOnly IsReadOnly IsReadOnly IsReadOnly

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

RelativeTime RelativeTime RelativeTime RelativeTime RelativeTime

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

SystemRelativeTime SystemRelativeTime SystemRelativeTime SystemRelativeTime SystemRelativeTime

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

Type Type Type Type Type

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

Methods

Close() Close() Close() Close() Close()

Disposes of the object and associated resources.

Dispose() Dispose() Dispose() Dispose() Dispose()

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

LockBuffer(AudioBufferAccessMode) LockBuffer(AudioBufferAccessMode) LockBuffer(AudioBufferAccessMode) LockBuffer(AudioBufferAccessMode) LockBuffer(AudioBufferAccessMode)

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

See also