Skip to content

Commit

Permalink
Test odd number samples
Browse files Browse the repository at this point in the history
  • Loading branch information
namse committed Sep 15, 2024
1 parent c79ef6c commit ddef50c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions namui/namui/src/system/audio/opus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,12 @@ mod tests {
let result = encode_to_ogg_opus(&pcms);
assert!(result.is_ok());
}

// 애매한 갯수의 샘플을 넣어서 테스트
#[test]
fn test_encode_stereo_to_ogg_opus_odd_numbers_samples() {
let pcms = vec![vec![0.0; 123456]; 2];
let result = encode_to_ogg_opus(&pcms);
assert!(result.is_ok());
}
}

0 comments on commit ddef50c

Please sign in to comment.