Udostępnij za pośrednictwem


AudioBuffer Class

Definition

Represents a buffer containing audio data.

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

Windows requirements

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

Remarks

Get an instance of this class by calling AudioFrame.LockBuffer.

Properties

Capacity

Gets the maximum number of bytes that the buffer can hold.

Length

Gets or sets the number of bytes currently in use in the buffer.

Methods

Close()

Disposes of the object and associated resources.

CreateReference()

Returns an IMemoryBufferReference representation of the audio buffer.

Dispose()

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

Applies to

See also