Build the Sample Application#
The sample application demonstrates the SDK APIs and is hosted on GitHub.
This sample includes the source file effects_demo.cpp, which you can compile and run along with CMake scripts to automatically find the required dependencies.
The release package includes the sample tree under samples. If you receive a
core-only package, acquire the same release-controlled sample revision by
opening PowerShell at the extracted SDK root and running the following:
$sampleCommit = '73cbdb8d4e988d4873d4347923de48c179259694'
.\samples\download_samples.ps1 -Destination .\samples -Ref $sampleCommit
The downloader fetches that exact commit and writes
samples\samples-download-manifest.json with the source URL, resolved commit,
file sizes, and SHA-256 hashes. After validation, the downloader promotes the
complete tree. A repeated identical acquisition verifies and skips identical
files. Destination-only files are preserved and reported. A conflicting file
causes no changes and returns nonzero; -Force replaces only the listed
conflicting sample files and reports every replacement. Fetch failures use
bounded backoff, and failed staging directories are removed.
Successful output names the resolved commit, installed-file count, destination, and manifest path. You can also manually fetch the same immutable commit with GitHub Desktop or Git, but do not build an unpinned default branch for an R22 release.
If the sample application and core package reside in different locations, you must set the AFX_SDK_ROOT environment variable to the path of the core package.
Command-Line Quick Start (x64 and N1X ARM64)#
Open PowerShell in the extracted SDK package’s samples directory. The following commands use only paths inside that package to configure an x64 Visual Studio build, build the Release binary, and verify its output:
$env:AFX_SDK_ROOT = (Resolve-Path ..).Path
cmake -S . -B build -A x64
cmake --build build --config Release
if (-not (Test-Path .\build\Release\effects_demo.exe)) { throw 'effects_demo.exe was not built' }
For an NVIDIA N1X ARM64 package, use its samples directory and run the following commands:
$env:AFX_SDK_ROOT = (Resolve-Path ..).Path
cmake -S . -B build-arm64 -A ARM64
cmake --build build-arm64 --config Release
if (-not (Test-Path .\build-arm64\Release\effects_demo.exe)) { throw 'effects_demo.exe was not built' }
Run helpers from the build-produced Release\scripts directory so that the helper
and executable stay together. For example, after the N1X build:
Set-Location .\build-arm64\Release\scripts
.\run_effects_demo.bat -e denoiser -isr 16k -osr 16k -ir 1.0 -ev 2 -vad 1
The copies under samples\apps\effects_demo\scripts are build inputs and
must not be run directly. Run only the generated helpers in the build-produced
Release\scripts directory.
Do not use ARM64-only headers or selectors when building against the x64 package.
CMake GUI Workflow#
To build the sample application, follow these steps:
Start the CMake GUI and specify the source folder and a build folder for the binary files.
For the source folder, ensure that the path ends in
package.For the build folder, ensure that the path ends in
package/build.
Use CMake to configure and generate the Visual Studio solution file.
Click Configure.
When prompted to confirm whether CMake can create the build folder, click OK.
Select Visual Studio for the generator. Select x64 for an x64 package or ARM64 for an NVIDIA N1X package.
To finish configuring the Visual Studio solution file, click Finish.
To generate the Visual Studio solution file, click Generate.
Use Visual Studio to generate the application binary (.exe) file from the solution file that was generated in the previous step.
In CMake, click Open Project to open Visual Studio.
In Visual Studio, select Build > Build Solution.