mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-06 10:11:31 +00:00
Forgot to check this in awhile ago
This commit is contained in:
1 parent
990faf3092
commit
6e7afc677a
1 file changed
+12
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user