Registry / Library

library · v0.1.1
ClipRuns
Count overloaded samples and the longest continuous run.
Use ClipRuns
use vendor::clipruns::clipruns;
Run the example
nest demo clipruns@0.1.1
blyxc native-run clipruns-demo/main.blyx
Example source and expected output
use vendor::clipruns::clipruns;
fn main() {
let samples = [1, -1, 0, 1];
let ceiling = 1.0;
let result = clipruns_count(samples, ceiling);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
3
2
2
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.1 | Download ZIP | 83f3aac799 | 6525374e44d82ea9da991d4ec26cdf4e4435e82c9f31224a112d5b1129434955 |