镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

SAR Implementation and Windows Server 2022 #122

Open

Description

@amurzeau

The way SAR is designed is largely obsolete. I can talk about this now: if you want to solve this problem, look in the 10.0.22000 Windows SDK headers um\audioclientactivationparams.h for VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK and knock yourself out =)

@eiz I tried to read some documentation about that but I didn't understand the underlying goal.
Do you mean that Windows 10 will have a way to do what SAR is doing, but without needing a custom driver ?

Activity

  1. changed the title [-]SAR Implementation and Windows 10 21H1[/-] [+]SAR Implementation and Windows Server 2022[/+] on Aug 16, 2021
  2. amurzeau commented on Aug 16, 2021

    @amurzeau
    CollaboratorAuthor

    The header contains this:

    // Identifier for virtual audio device that supports audio loopback based on
    // a process ID instead of the device interface path of a physical audio device.
    // Use this for the deviceInterfacePath parameter of ActivateAudioInterfaceAsync when
    // AUDIOCLIENT_ACTIVATION_PARAMS::ActivationType is set to AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK.
    #define VIRTUAL_AUDIO_DEVICE_PROCESS_LOOPBACK L"VAD\\Process_Loopback"
    typedef /* [v1_enum] */ 
    enum PROCESS_LOOPBACK_MODE
        {
            PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE	= 0,
            PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE	= 1
        } 	PROCESS_LOOPBACK_MODE;
    
    // This structure is used when creating an IAudioClient using ActivateAudioInterfaceAsync
    // for process-based loopback capture. The captured audio either includes or excludes audio rendered
    // by the specified process and its child processes, based on how the ProcessLoopbackMode field is set.
    typedef struct AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS
        {
        DWORD TargetProcessId;
        PROCESS_LOOPBACK_MODE ProcessLoopbackMode;
        } 	AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS;
    
    typedef /* [v1_enum] */ 
    enum AUDIOCLIENT_ACTIVATION_TYPE
        {
            AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT	= 0,
            AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK	= 1
        } 	AUDIOCLIENT_ACTIVATION_TYPE;
    
    // Activation parameter structure that can be used with ActivateAudioInterfaceAsync
    // to create an IAudioClient.
    typedef struct AUDIOCLIENT_ACTIVATION_PARAMS
        {
        AUDIOCLIENT_ACTIVATION_TYPE ActivationType;
        union 
            {
            AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS ProcessLoopbackParams;
            } 	DUMMYUNIONNAME;
        } 	AUDIOCLIENT_ACTIVATION_PARAMS;

    It seems to me that the goal is to allow an UWP app to capture audio output by some processes only (using the process ID) via the ActivateAudioInterfaceAsync function and a fake capture device.

    So this does not seems to render SAR useless, as it is still not possible to output audio to a virtual user defined audio device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions