wavegraph-sample
PCM sample types such as I24, format conversions, and the Sample trait
from RustAudio's dasp_sample. The default build uses core and requires
no allocator. Enable the std feature to use the standard library's
floating-point square roots.
With std disabled, upstream's FloatSample::sample_sqrt uses a
Newton approximation. It returns NaN for positive infinity and can lose
precision on subnormal inputs.
Upstream
This is a temporary copy of the dasp_sample source and tests at
d0892971a3b72dee9b3ff0d16f94b0962605e858. WaveGraph is waiting for a
crates.io release containing the stable no_std fix. The published
0.11.0 release uses core_intrinsics with std disabled. Upstream issue
#187 requests a new release that includes the license files.
The local crate uses the name wavegraph_sample in Rust and makes std
opt-in. It removes the unused extern crate alloc that makes a freestanding
binary require a global allocator. To retire this copy, the published crate
must also work without a global allocator.
License
Copyright (c) 2016 RustAudio Developers and (c) 2026 WaveGraph Developers. Licensed under either the MIT License or the Apache License, Version 2.0 at your option.