7/26/2023 0 Comments Loopback api![]() ![]() Windows holds a reference to the application's IActivateAudioInterfaceCompletionHandler interface until the operation is complete and the application releases the IActivateAudioInterfaceAsyncOperation interface.ĭepending on which WASAPI interface is activated, this function may display a consent prompt the first time it is called. Calling ActivateAudioInterfaceAsync from a session 0 service.Calling ActivateAudioInterfaceAsync with a deviceInterfacePath that specifies an audio render device and an riid that specifies the IAudioEndpointVolume interface.Calling ActivateAudioInterfaceAsync with a deviceInterfacePath that specifies an audio render device and an riid that specifies the IAudioClient interface.These explicitly safe activations include: There are some activations that are explicitly safe and therefore don't require that this function be called from the main UI thread. ![]() The application can then call a method in the IActivateAudioInterfaceAsyncOperation interface to retrieve the result code and the requested WASAPI interface. Windows calls a method in the application’s IActivateAudioInterfaceCompletionHandler interface from a worker thread in the COM Multi-threaded Apartment (MTA) when the activation results are available. The application passes an IActivateAudioInterfaceCompletionHandler callback COM interface through completionHandler. This function enables Windows Store apps to activate certain WASAPI COM interfaces after using Windows Runtime APIs in the Windows.Devices and namespaces to select an audio device.įor many implementations, an application must call this function from the main UI thread to activate a COM interface in the WASAPI family so that the system can show a dialog to the user. On versions of Windows previous to Windows 10, this error may result if the function is called from an incorrect COM apartment, or if the passed IActivateAudioInterfaceCompletionHandler is not implemented on an agile object (aggregating a free-threaded marshaler). The underlying object and asynchronous operation were created successfully. Possible values include, but are not limited to, those in the following table. Returns an IActivateAudioInterfaceAsyncOperation interface that represents the asynchronous operation of activating the requested WASAPI interface. Starting with TBD, you can specify AUDIOCLIENT_ACTIVATION_PARAMS to activate the interface to include or exclude audio streams associated with a specified process ID.Īn interface implemented by the caller that is called by Windows when the result of the activation procedure is available. For more information, see the pActivationParams parameter in IMMDevice::Activate. Interface-specific activation parameters. The IID of a COM interface in the WASAPI family, such as IAudioClient. For sample code that demonstrates the process loopback capture scenario, see the Application Loopback API Capture Sample. Specify AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK to activate the audio interface for process loopback capture. Call StringFromIID to convert either of these GUIDs to an LPCWSTR to use for this argument. The GUIDs DEVINTERFACE_AUDIO_CAPTURE and DEVINTERFACE_AUDIO_RENDER represent the default audio capture and render device respectively. This is normally retrieved from a DeviceInformation object or one of the methods of the MediaDevice class. IActivateAudioInterfaceAsyncOperation **activationOperationĪ device interface ID for an audio device. IActivateAudioInterfaceCompletionHandler *completionHandler, Syntax HRESULT ActivateAudioInterfaceAsync( Enables Windows Store apps to access preexisting Component Object Model (COM) interfaces in the WASAPI family. ![]()
0 Comments
Leave a Reply. |