forge
Explore
Log in

Don't you dare go Hollow

Match AAC noise sequence

Browse files at this commit

0fcbd4138c5f40ff8c18c28085a12bbe332bfd8fAhmet Kaan GümüşParent: d5b5f3d
  • fix
    • match AAC noise sequence
Show full message
fix: match AAC noise sequence
crates/ec-aac/src/decode.rsmodified+2 -2
@@ -488,7 +488,7 @@ pub struct Noise(u32);
488488 impl Noise {
489489 fn next(&mut self) -> f32 {
490490 self.0 = self.0.wrapping_mul(1_664_525).wrapping_add(1_013_904_223);
491- (self.0 >> 8) as f32 / (1 << 23) as f32 - 1.0
491+ i32::from_ne_bytes(self.0.to_ne_bytes()) as f32
492492 }
493493 }
494494
@@ -508,7 +508,7 @@ impl BlockDecoder {
508508 books: Books::new(),
509509 bank: FilterBank::new(),
510510 states: Vec::new(),
511- noise: Noise(0x1234_5678),
511+ noise: Noise(0x1f2e_3d4c),
512512 sf_index,
513513 sbr: None,
514514 }