AudioGraph.CreateDeviceInputNodeAsync Method

Definition

Overloads

CreateDeviceInputNodeAsync(MediaCategory)

Creates an AudioDeviceInputNode that inputs audio data into the audio graph from the default audio input device, such as a microphone or audio card.

CreateDeviceInputNodeAsync(MediaCategory, AudioEncodingProperties)

Creates an AudioDeviceInputNode that inputs audio data into the audio graph from the default audio input device such as a microphone or audio card.

CreateDeviceInputNodeAsync(MediaCategory, AudioEncodingProperties, DeviceInformation)

Creates an AudioDeviceInputNode that inputs audio data into the audio graph from the specified audio input device such as a microphone or audio card.

CreateDeviceInputNodeAsync(MediaCategory, AudioEncodingProperties, DeviceInformation, AudioNodeEmitter)

Creates a spatial audio-enabled AudioDeviceInputNode that inputs audio data into the audio graph from the specified audio input device such as a microphone or audio card.

CreateDeviceInputNodeAsync(MediaCategory)

Creates an AudioDeviceInputNode that inputs audio data into the audio graph from the default audio input device, such as a microphone or audio card.

public:
 virtual IAsyncOperation<CreateAudioDeviceInputNodeResult ^> ^ CreateDeviceInputNodeAsync(MediaCategory category) = CreateDeviceInputNodeAsync;
/// [Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory const& category);
[Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory category);
function createDeviceInputNodeAsync(category)
Public Function CreateDeviceInputNodeAsync (category As MediaCategory) As IAsyncOperation(Of CreateAudioDeviceInputNodeResult)

Parameters

category
MediaCategory

A value from the MediaCategory enumeration value indicating the category of the media processed by this node, allowing the system to perform content-appropriate processing and prioritization of the media.

Returns

IAsyncOperation<CreateAudioDeviceInputNodeResult>

An asynchronous operation that returns a CreateAudioDeviceInputNodeResult on completion. This object exposes a Status property, that indicates either that the operation was successful or the reason why the operation failed. The DeviceInputNode property provides a reference to the created input node on success.

Attributes

Windows requirements

App capabilities
backgroundMediaRecording

Remarks

Other overloads of this method allow you to specify the ID of a specific audio device instead of using the system's default device.

See also

Applies to

CreateDeviceInputNodeAsync(MediaCategory, AudioEncodingProperties)

Creates an AudioDeviceInputNode that inputs audio data into the audio graph from the default audio input device such as a microphone or audio card.

public:
 virtual IAsyncOperation<CreateAudioDeviceInputNodeResult ^> ^ CreateDeviceInputNodeAsync(MediaCategory category, AudioEncodingProperties ^ encodingProperties) = CreateDeviceInputNodeAsync;
/// [Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeWithFormatAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory const& category, AudioEncodingProperties const& encodingProperties);
[Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeWithFormatAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory category, AudioEncodingProperties encodingProperties);
function createDeviceInputNodeAsync(category, encodingProperties)
Public Function CreateDeviceInputNodeAsync (category As MediaCategory, encodingProperties As AudioEncodingProperties) As IAsyncOperation(Of CreateAudioDeviceInputNodeResult)

Parameters

category
MediaCategory

A value from the MediaCategory enumeration value indicating the category of the media processed by this node, allowing the system to perform content-appropriate processing and prioritization of the media.

encodingProperties
AudioEncodingProperties

An object representing the audio encoding properties for the device input node which specifies the sample rate at which the created node will operate. Only uncompressed PCM and float formats are allowed.

Returns

IAsyncOperation<CreateAudioDeviceInputNodeResult>

An asynchronous operation that returns a CreateAudioDeviceInputNodeResult on completion. This object exposes a Status property, that indicates either that the operation was successful or the reason why the operation failed. The DeviceInputNode property provides a reference to the created input node on success.

Attributes

Windows requirements

App capabilities
backgroundMediaRecording

Remarks

Other overloads of this method allow you to specify the ID of a specific audio device instead of using the system's default device.

See also

Applies to

CreateDeviceInputNodeAsync(MediaCategory, AudioEncodingProperties, DeviceInformation)

Creates an AudioDeviceInputNode that inputs audio data into the audio graph from the specified audio input device such as a microphone or audio card.

public:
 virtual IAsyncOperation<CreateAudioDeviceInputNodeResult ^> ^ CreateDeviceInputNodeAsync(MediaCategory category, AudioEncodingProperties ^ encodingProperties, DeviceInformation ^ device) = CreateDeviceInputNodeAsync;
/// [Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeWithFormatOnDeviceAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory const& category, AudioEncodingProperties const& encodingProperties, DeviceInformation const& device);
[Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeWithFormatOnDeviceAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory category, AudioEncodingProperties encodingProperties, DeviceInformation device);
function createDeviceInputNodeAsync(category, encodingProperties, device)
Public Function CreateDeviceInputNodeAsync (category As MediaCategory, encodingProperties As AudioEncodingProperties, device As DeviceInformation) As IAsyncOperation(Of CreateAudioDeviceInputNodeResult)

Parameters

category
MediaCategory

A value from the MediaCategory enumeration value indicating the category of the media processed by this node, allowing the system to perform content-appropriate processing and prioritization of the media.

encodingProperties
AudioEncodingProperties

An object representing the audio encoding properties for the device input node which specifies the sample rate at which the created node will operate. Only uncompressed PCM and float formats are allowed.

device
DeviceInformation

A DeviceInformation object representing the device from which the device input node will get audio data.

Returns

IAsyncOperation<CreateAudioDeviceInputNodeResult>

An asynchronous operation that returns a CreateAudioDeviceInputNodeResult on completion. This object exposes a Status property, that indicates either that the operation was successful or the reason why the operation failed. The DeviceInputNode property provides a reference to the created input node on success.

Attributes

Windows requirements

App capabilities
backgroundMediaRecording

Remarks

Call FindAllAsync, passing in the value returned by GetAudioCaptureSelector, to get the list of DeviceInformation objects representing the available capture devices. For more information, see Audio graphs.

See also

Applies to

CreateDeviceInputNodeAsync(MediaCategory, AudioEncodingProperties, DeviceInformation, AudioNodeEmitter)

Creates a spatial audio-enabled AudioDeviceInputNode that inputs audio data into the audio graph from the specified audio input device such as a microphone or audio card.

public:
 virtual IAsyncOperation<CreateAudioDeviceInputNodeResult ^> ^ CreateDeviceInputNodeAsync(MediaCategory category, AudioEncodingProperties ^ encodingProperties, DeviceInformation ^ device, AudioNodeEmitter ^ emitter) = CreateDeviceInputNodeAsync;
/// [Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory const& category, AudioEncodingProperties const& encodingProperties, DeviceInformation const& device, AudioNodeEmitter const& emitter);
[Windows.Foundation.Metadata.Overload("CreateDeviceInputNodeWithFormatAndEmitterOnDeviceAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<CreateAudioDeviceInputNodeResult> CreateDeviceInputNodeAsync(MediaCategory category, AudioEncodingProperties encodingProperties, DeviceInformation device, AudioNodeEmitter emitter);
function createDeviceInputNodeAsync(category, encodingProperties, device, emitter)
Public Function CreateDeviceInputNodeAsync (category As MediaCategory, encodingProperties As AudioEncodingProperties, device As DeviceInformation, emitter As AudioNodeEmitter) As IAsyncOperation(Of CreateAudioDeviceInputNodeResult)

Parameters

category
MediaCategory

A value from the MediaCategory enumeration value indicating the category of the media processed by this node, allowing the system to perform content-appropriate processing and prioritization of the media.

encodingProperties
AudioEncodingProperties

An object representing the audio encoding properties for the device input node which specifies the sample rate at which the created node will operate. Only uncompressed PCM and float formats are allowed.

device
DeviceInformation

A DeviceInformation object representing the device from which the device input node will get audio data.

emitter
AudioNodeEmitter

An object that describes the position and other physical characteristics of the emitter from which the node's audio is emitted when spatial audio processing is used.

Returns

IAsyncOperation<CreateAudioDeviceInputNodeResult>

An asynchronous operation that returns a CreateAudioDeviceInputNodeResult on completion. This object exposes a Status property, that indicates either that the operation was successful or the reason why the operation failed. The DeviceInputNode property provides a reference to the created input node on success.

Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)
App capabilities
backgroundMediaRecording

Remarks

Call FindAllAsync, passing in the value returned by GetAudioCaptureSelector, to get the list of DeviceInformation objects representing the available capture devices. For more information, see Audio graphs.

See also

Applies to