Advertisement
Guest User

Untitled

a guest
Apr 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.26 KB | None | 0 0
  1. // Produce a sinusoid of maximum amplitude.
  2.         let mut data_source : Vec<f32> = (0u64..).map(move |t| t as f32 * 900.0 * 2.0 * 3.141592 / SAMPLES_RATE as f32)     // 440 Hz
  3.                                     .map(move |t| t.sin()).take(100000).collect();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement