Skip to content

Commit

Permalink
fix bench code
Browse files Browse the repository at this point in the history
  • Loading branch information
AkiyukiOkayasu committed Aug 20, 2024
1 parent 8ea6863 commit a60b5cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ fn parse_wav(c: &mut Criterion) {
let wav = include_bytes!("../tests/resources/Sine440Hz_1ch_48000Hz_16.wav");
c.bench_function("Parse WAV 16bit", |b| {
b.iter(|| {
let _reader = PcmReader::new(black_box(wav));
let _reader = PcmReader::new(black_box(wav)).unwrap();
})
});
}

fn read_sample(c: &mut Criterion) {
let wav = include_bytes!("../tests/resources/Sine440Hz_1ch_48000Hz_16.wav");
let reader = PcmReader::new(wav);
let reader = PcmReader::new(wav).unwrap();
let pcm_specs = reader.get_pcm_specs();
c.bench_function("Read a sample 16bit", |b| {
b.iter(|| {
Expand Down

0 comments on commit a60b5cc

Please sign in to comment.