docs: condense implementation comments
This commit is contained in:
@@ -1,17 +1,8 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Single-process WASAPI loopback capture via AUDIOCLIENT_ACTIVATION_PARAMS
|
||||
// (Windows 10 2004+ / Build 19041+).
|
||||
//
|
||||
// Threading: ALL WASAPI init runs on the capture thread (MTA). If called from the
|
||||
// WinForms UI thread (STA), ActivateAudioInterfaceAsync fires ActivateCompleted on
|
||||
// an MTA pool thread; COM marshals that back to the STA pump — but the STA thread is
|
||||
// blocked on CompletionEvent.Wait → deadlock. MTA capture thread avoids this.
|
||||
//
|
||||
// COM QI policy: the COM objects returned by the process-loopback activation path
|
||||
// reject QueryInterface for their own IIDs under .NET's RCW mechanism. Every call
|
||||
// to IAudioClient and IAudioCaptureClient is therefore dispatched via raw vtable
|
||||
// pointer arithmetic, bypassing .NET COM interop entirely.
|
||||
// Process loopback requires MTA activation; blocking activation from the WinForms STA
|
||||
// deadlocks COM completion. The returned interfaces also reject RCW QueryInterface, so audio
|
||||
// calls use explicitly owned raw pointers and vtable dispatch.
|
||||
namespace VoiceCat.App.Audio;
|
||||
|
||||
public sealed class ProcessLoopbackCapture : IDisposable
|
||||
|
||||
Reference in New Issue
Block a user