Adds "only selected apps" and "all apps except selected" screen-audio modes to the Windows client, alongside the existing entire-desktop path. Per-app capture uses WASAPI process loopback (AUDCLNT_ACTIVATIONTYPE_ PROCESS_LOOPBACK) via ProcessLoopbackCapture, mixed by ProcessAudioMixer and fed to the core through vc_stream_feed_pcm (external_feed=1 so the core skips its own loopback device). Init must pass AUDCLNT_STREAMFLAGS_LOOPBACK | EVENTCALLBACK | AUTOCONVERTPCM; the LOOPBACK flag is what makes the virtual endpoint deliver rendered audio (without it every buffer is flagged SILENT) and AUTOCONVERTPCM resamples the app's native format to 48k s16. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
2.1 KiB
XML
44 lines
2.1 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\VoiceCat.Interop\VoiceCat.Interop.csproj" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<OutputType>WinExe</OutputType>
|
|
<TargetFramework>net10.0-windows</TargetFramework>
|
|
<Nullable>enable</Nullable>
|
|
<UseWindowsForms>true</UseWindowsForms>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
|
<AssemblyName>VoiceCat.App</AssemblyName>
|
|
<RootNamespace>VoiceCat.App</RootNamespace>
|
|
<!-- Per-monitor v2 DPI awareness (correct scaling on multi-monitor/high-DPI — matters for
|
|
low-vision users as much as general UX). Set via this property, not app.manifest —
|
|
WinForms' own analyzer (WFO0003) flags manifest-based DPI settings as superseded by
|
|
this property in modern .NET. -->
|
|
<ApplicationHighDpiMode>PerMonitorV2</ApplicationHighDpiMode>
|
|
<!-- WASAPI process-loopback COM interop in Audio/ProcessLoopbackCapture.cs uses unsafe
|
|
pointer arithmetic for PROPVARIANT/AUDIOCLIENT_ACTIVATION_PARAMS marshaling. -->
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
</PropertyGroup>
|
|
|
|
<!-- System.Security.Cryptography.ProtectedData (PasswordProtector.cs's DPAPI wrapper) ships
|
|
as part of the Windows Desktop shared framework on net10.0-windows — no PackageReference
|
|
needed (one was tried and NuGet flagged it as redundant/unprunable, NU1510). -->
|
|
|
|
<!-- voicecat.dll must exist (build the `windows-client` CMake preset first — see
|
|
clients/windows/README.md). -->
|
|
<ItemGroup>
|
|
<Content Include="$(VoiceCatNativeDir)\voicecat.dll" Condition="Exists('$(VoiceCatNativeDir)\voicecat.dll')">
|
|
<Link>voicecat.dll</Link>
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
</Content>
|
|
</ItemGroup>
|
|
|
|
<Target Name="VoiceCatCheckNativeDll" BeforeTargets="Build">
|
|
<Error Condition="!Exists('$(VoiceCatNativeDir)\voicecat.dll')"
|
|
Text="voicecat.dll not found at '$(VoiceCatNativeDir)'. Build it first: cmake --preset windows-client && cmake --build --preset windows-client (see clients/windows/README.md)." />
|
|
</Target>
|
|
|
|
</Project> |