Forgot to check this in awhile ago

This commit is contained in:
Brandon Thomas committed 2016-09-10 17:56:30 -04:00
1 parent 990faf3092
commit 6e7afc677a
1 file changed
+12
+12
View File
@@ -0,0 +1,12 @@
// Copyright (c) 2016 Brandon Thomas <bt@brand.io, echelon@gmail.com>
/// Create a waveform pause of the desired length.
pub fn generate_pause(length: u16) -> Vec<i16> {
let mut sound = Vec::new();
let len = length * 2; // number of channels
for i in 0..len { sound.push(0); }
sound
}