euphony_dsp/
lib.rs

1// #![cfg_attr(not(any(feature = "std", test)), no_std)]
2
3/// Asserts that a boolean expression is true at runtime, only if debug_assertions are enabled.
4///
5/// Otherwise, the compiler is told to assume that the expression is always true and can perform
6/// additional optimizations.
7macro_rules! unsafe_assert {
8    ($cond:expr) => {
9        unsafe_assert!($cond, "assumption failed: {}", stringify!($cond));
10    };
11    ($cond:expr $(, $fmtarg:expr)* $(,)?) => {{
12        let v = $cond;
13
14        debug_assert!(v $(, $fmtarg)*);
15        if cfg!(not(debug_assertions)) && !v {
16            core::hint::unreachable_unchecked();
17        }
18    }};
19}
20
21mod fun;
22mod prelude;
23
24pub mod nodes;
25pub mod sample;
26
27mod binary;
28mod buffer;
29mod env;
30mod filter;
31mod osc;
32mod tertiary;
33mod unary;
34
35#[test]
36fn reflection() {
37    euphony_node::reflect::generate_files(env!("CARGO_MANIFEST_DIR"));
38}