pub fn encode_bytes(bytes: &[u8], sample_rate_hz: f32) -> Vec<f32> {
    let mut osc = PhaseAccumulator::new(1f32, sample_rate_hz);
    let mut samples: Vec<f32> = Vec::new();
    for b in bytes {
        let mut s = encode_byte(&mut osc, b);
        samples.append(&mut s);
    }
    samples
}
/// Encode a string of bytes into a SAME message
Encode a string of bytes into a SAME message
Encode a string of bytes into a SAME message
pub fn encode_bytes(bytes: &[u8], sample_rate_hz: f32) -> Vec<f32> {
    let mut osc = PhaseAccumulator::new(1f32, sample_rate_hz);
    let mut samples: Vec<f32> = Vec::new();
    for b in bytes {
        let mut s = encode_byte(&mut osc, b);
        samples.append(&mut s);
    }
    samples
}
pub fn encode_bytes ( bytes : & [ u8 ] , sample_rate_hz : f32 ) -> Vec < f32 > { let mut osc = PhaseAccumulator :: new ( 1f32 , sample_rate_hz ) ; let mut samples : Vec < f32 > = Vec :: new ( ) ; for b in bytes { let mut s = encode_byte ( & mut osc , b ) ; samples . append ( & mut s ) ; } samples }
Encode a string of bytes into a SAME message
Encode a string of bytes into a SAME message
bytes
&[u8]
sample_rate_hz
f32