rvoip-codec-core 0.2.2

G.711 and optional G.729A/G.729AB audio codec implementation for RVOIP
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::*;

#[test]
fn dsp_shl_saturates() {
    let mut ctx = DspContext::default();
    let r = shl(&mut ctx, Word16(20_000), 2);
    assert_eq!(r.0, MAX_16);
    assert!(ctx.overflow);
}

#[test]
fn dsp_norm_l_counts_leading_zeros() {
    assert_eq!(norm_l(Word32(0x1000_0000)), 2);
}