forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'lane-corr': AAC PNS noise generator follows the reference seed and value convention

Browse files at this commit

20680e8bd3d812e20ae57ebc15c775e3bf7b52f5Ahmet Kaan GümüşParent: d5b5f3d0fcbd41
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 }