-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Currently encoders crashes for 8 KHz with the following:
---- lc3::test::lc3_encode stdout ----
thread 'lc3::test::lc3_encode' panicked at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lc3-codec-0.2.0/src/encoder/bandwidth_detector.rs:36:34:
attempt to subtract with overflow
stack backtrace:
0: rust_begin_unwind
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:72:14
2: core::panicking::panic
at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/core/src/panicking.rs:145:5
3: lc3_codec::encoder::bandwidth_detector::BandwidthDetector::new
at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lc3-codec-0.2.0/src/encoder/bandwidth_detector.rs:36:34
4: lc3_codec::encoder::lc3_encoder::Lc3Encoder::new
at /home/kayo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/lc3-codec-0.2.0/src/encoder/lc3_encoder.rs:134:38
Seems it happened because fs_idx for 8KHz is 0:
lc3-codec/src/common/config.rs
Line 44 in c912899
| SamplingFrequency::Hz8000 => (0, 8000), |
Metadata
Metadata
Assignees
Labels
No labels