|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
DSPark is header-only and dependency-free, so working on the framework itself needs nothing beyond a C++20 compiler and CMake. Everything below works identically on Windows, Linux and macOS.
| Minimum | |
|---|---|
| Compiler | MSVC 19.50+, GCC 12+, Clang 15+ |
| CMake | 3.21 |
No package manager, no vendored SDK to fetch, no environment to prepare. The framework has no dependencies; the only third-party code in the repository is bundled inside DSParkLab/vendor/ and plugin/, and neither is needed to build or test the framework.
On Windows the Visual Studio generator is multi-config, so name the configuration on the last two commands:
There are also CMake presets:
That builds and runs, among the registered ctest entries:
| Test | What it covers |
|---|---|
suite | The test suite proper: 940+ cases across every module and the plugin layer |
smoke | Every effect at default settings, checked for NaN/Inf and runaway output |
standalone | Compile gate: the umbrella header alone, every template at float and double |
conformance | The public conformance suite, including EBU R128 validation |
Both suites are on by default when DSPark is the top-level project and off when it is consumed through add_subdirectory or FetchContent. Use -DDSPARK_BUILD_TESTS=OFF or -DDSPARK_BUILD_CONFORMANCE=OFF to opt out.
The test targets are built with optimisations but without NDEBUG, even in Release. A number of cases exercise the framework's debug-time contracts (bounds, ranges, preconditions), so tests/CMakeLists.txt strips NDEBUG from the optimised configurations. This is deliberate: the suite is optimised for speed, not to switch off its own checks.
If you are measuring performance rather than correctness, use bench/ instead, which builds the way an application would.
Every push and pull request runs, across Windows (MSVC x64 and ARM64), Linux (GCC and Clang, x64 and ARM64), macOS (ARM64) and WebAssembly:
pluginval, clap-validator and Apple's auval, plus DSPark's own VST3/CLAP smoke hosts (bypass latency alignment, oversize blocks, parameter text round trips)find_package(dspark), building an application and a plugin with dspark_add_plugin()A change is ready when all of it is green.
-> not an arrow, +/- not a plus-minus sign, ~ not an approximation sign.<algorithm>, <vector>, <cmath> and friends explicitly.prepare(). Anything shared between the control thread and the audio thread follows the threading model, which states the contract once so each header only has to say which of its methods belongs where.python3 tools/check_comment_style.py checks all four and runs in CI.Add cases next to the module they cover, using the harness in tests/dspark_test.h (auto-registering, zero dependencies, DSP-specific assertions such as EXPECT_SILENT, EXPECT_BOUNDED and EXPECT_NO_NAN):
A test that pins a measured DSP property is worth more than one that only checks the code runs. Where a case exists because of a specific defect, say so in a comment and give the number the old behaviour produced, so the next reader knows what the tolerance is protecting.
Any change to a public API must update the tests in the same commit. The suite is part of the repository precisely so this cannot drift.
The interactive testing app is Windows-only: it is built on Win32 and Direct3D
DSParkLab/build.bat, which finds Visual Studio 2019 or later (any edition, or the Build Tools) with the C++ x64 tools by itself. The framework, the test suite and the plugin layer are fully cross-platform; only the Lab is not.By contributing you agree that your contributions are licensed under the MIT Licence, the same terms that cover the project.