mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2024-11-10 06:34:18 +00:00
fix flac bit depth
This commit is contained in:
parent
29378f53a5
commit
9deb7f27f0
2 changed files with 2 additions and 1 deletions
|
@ -36,6 +36,7 @@ fn main() {
|
|||
properties.overall_bitrate().unwrap_or(0)
|
||||
);
|
||||
println!("Sample Rate: {}", properties.sample_rate().unwrap_or(0));
|
||||
println!("Bit depth: {}", properties.bit_depth().unwrap_or(0));
|
||||
println!("Channels: {}", properties.channels().unwrap_or(0));
|
||||
println!("Duration: {}", duration_display);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ where
|
|||
let info = stream_info.read_u32::<BigEndian>()?;
|
||||
|
||||
let sample_rate = info >> 12;
|
||||
let bits_per_sample = ((info >> 4) & 0b1111) + 1;
|
||||
let bits_per_sample = ((info >> 4) & 0b11111) + 1;
|
||||
let channels = ((info >> 9) & 7) + 1;
|
||||
|
||||
// Read the remaining 32 bits of the total samples
|
||||
|
|
Loading…
Reference in a new issue