# Building

Audio Path Tone Tester is a C++20 native Windows application built with CMake,
MSVC, the Windows SDK, Dear ImGui, Win32, and DirectX 11.

## Requirements

- Windows 10/11 x64.
- CMake 3.23 or newer.
- Visual Studio 2022 or Visual Studio Build Tools 2022 with C++ desktop tools.
- Windows SDK.
- Ninja when using the Ninja presets.

Do not install dependencies globally from automated runs. For normal local use,
install Visual Studio/CMake/Ninja through your usual Windows development
environment.

## Default Build

ASIO SDK-backed integration is disabled by default.

```powershell
cmake --preset msvc-debug -DENABLE_ASIO=OFF
cmake --build --preset msvc-debug
ctest --preset msvc-debug
```

From a Visual Studio developer shell with Ninja on `PATH`:

```powershell
cmake --preset ninja-msvc-debug
cmake --build --preset ninja-msvc-debug
ctest --preset ninja-msvc-debug
```

## ASIO-Enabled Build

The public source folder includes the SDK source subset required by the current
optional ASIO backend build. ASIO integration remains explicit:

```powershell
cmake --preset vs2026-ninja-asio-debug -DENABLE_ASIO=ON
cmake --build --preset vs2026-ninja-asio-debug
ctest --preset vs2026-ninja-asio-debug
```

Use ASIO only as a backend/API label. Do not add ASIO to the product name, do
not bundle vendor ASIO drivers, and do not add ASIO logo artwork.

## Package

The default one-file executable package keeps `ENABLE_ASIO=OFF`:

```powershell
cmake --preset vs2026-ninja-release
cmake --build --preset vs2026-ninja-release --target package_onefile_smoke
```

For ASIO-enabled binary distribution, configure a separate Release build with
`ENABLE_ASIO=ON` and the exact GPLv3 corresponding-source package name and
SHA-256:

```powershell
-DAPTT_PACKAGE_ACK_ASIO_GPLV3_SOURCE=ON
-DAPTT_ASIO_CORRESPONDING_SOURCE_PACKAGE=<path-or-name>
-DAPTT_ASIO_CORRESPONDING_SOURCE_SHA256=<sha256>
```

See `docs/PACKAGING.md`.

## Current Scope

The app opens a Win32/DX11 Dear ImGui diagnostic UI and includes discovery,
format probing, playback, high-load diagnostics, lifecycle controls, automated
single-device planning/execution, and diagnostic bundle export for the
implemented backends.

The default build does not load ASIO drivers. ASIO driver access, hardware
playback, Kernel Streaming playback, and high-load diagnostics are real-device
operations and should be run deliberately against an explicitly selected device.
