using System; namespace NAudio.CoreAudioApi { /// /// AUDCLNT_STREAMFLAGS /// https://docs.microsoft.com/en-us/windows/win32/coreaudio/audclnt-streamflags-xxx-constants /// [Flags] public enum AudioClientStreamFlags : uint { /// /// None /// None, /// /// AUDCLNT_STREAMFLAGS_CROSSPROCESS /// The audio stream will be a member of a cross-process audio session. /// CrossProcess = 0x00010000, /// /// AUDCLNT_STREAMFLAGS_LOOPBACK /// The audio stream will operate in loopback mode /// Loopback = 0x00020000, /// /// AUDCLNT_STREAMFLAGS_EVENTCALLBACK /// Processing of the audio buffer by the client will be event driven /// EventCallback = 0x00040000, /// /// AUDCLNT_STREAMFLAGS_NOPERSIST /// The volume and mute settings for an audio session will not persist across application restarts /// NoPersist = 0x00080000, /// /// AUDCLNT_STREAMFLAGS_RATEADJUST /// The sample rate of the stream is adjusted to a rate specified by an application. /// RateAdjust = 0x00100000, /// /// AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY /// When used with AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM, a sample rate converter with better quality /// than the default conversion but with a higher performance cost is used. This should be used if /// the audio is ultimately intended to be heard by humans as opposed to other scenarios such as /// pumping silence or populating a meter. /// SrcDefaultQuality = 0x08000000, /// /// AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM /// A channel matrixer and a sample rate converter are inserted as necessary to convert between the uncompressed format supplied to IAudioClient::Initialize and the audio engine mix format. /// AutoConvertPcm = 0x80000000, } /// /// AUDIOCLIENT_ACTIVATION_PARAMS /// https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_activation_params /// struct AudioClientActivationParams { public AudioClientActivationType ActivationType; public AudioClientProcessLoopbackParams ProcessLoopbackParams; } /// /// AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS /// https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ns-audioclientactivationparams-audioclient_process_loopback_params /// struct AudioClientProcessLoopbackParams { /// /// AUDIOCLIENT_PROCESS_LOOPBACK_PARAMS /// The ID of the process for which the render streams, and the render streams of its child processes, will be included or excluded when activating the process loopback stream. /// public uint TargetProcessId; public ProcessLoopbackMode ProcessLoopbackMode; } /// /// PROCESS_LOOPBACK_MODE /// https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-process_loopback_mode /// enum ProcessLoopbackMode { /// /// PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE /// Render streams from the specified process and its child processes are included in the activated process loopback stream. /// IncludeTargetProcessTree, /// /// PROCESS_LOOPBACK_MODE_EXCLUDE_TARGET_PROCESS_TREE /// Render streams from the specified process and its child processes are excluded from the activated process loopback stream. /// ExcludeTargetProcessTree } /// /// AUDIOCLIENT_ACTIVATION_TYPE /// https://docs.microsoft.com/en-us/windows/win32/api/audioclientactivationparams/ne-audioclientactivationparams-audioclient_activation_type /// enum AudioClientActivationType { /// /// AUDIOCLIENT_ACTIVATION_TYPE_DEFAULT /// Default activation. /// Default, /// /// AUDIOCLIENT_ACTIVATION_TYPE_PROCESS_LOOPBACK /// Process loopback activation, allowing for the inclusion or exclusion of audio rendered by the specified process and its child processes. /// ProcessLoopback }; }