Registry / Library

library · v0.1.1
ActivitySpan
Locate active frames in a sequence of nonnegative signal levels.
Use ActivitySpan
use vendor::activityspan::activityspan;
Run the example
nest demo activityspan@0.1.1
blyxc native-run activityspan-demo/main.blyx
Example source and expected output
use vendor::activityspan::activityspan;
fn main() {
let levels = [0, 2, 0, 3, 0];
let threshold = 1.0;
let result = activityspan_bounds(levels, threshold);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
1
4
2
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP | 5868f268f4 | 2846d1b93d27fe942bad828b0370d811322dce9ea8d4b78886c06bf80771430c |