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);
488 impl Noise {488 impl Noise {
489 fn next(&mut self) -> f32 {489 fn next(&mut self) -> f32 {
490 self.0 = self.0.wrapping_mul(1_664_525).wrapping_add(1_013_904_223);490 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.0491+ i32::from_ne_bytes(self.0.to_ne_bytes()) as f32
492 }492 }
493 }493 }
494 494
@@ -508,7 +508,7 @@ impl BlockDecoder {
508 books: Books::new(),508 books: Books::new(),
509 bank: FilterBank::new(),509 bank: FilterBank::new(),
510 states: Vec::new(),510 states: Vec::new(),
511- noise: Noise(0x1234_5678),511+ noise: Noise(0x1f2e_3d4c),
512 sf_index,512 sf_index,
513 sbr: None,513 sbr: None,
514 }514 }