forge
Explore
Log in

Don't you dare go Hollow

ec-truehd: allow missing_docs on MajorSyncInfo::num_substreams/len (no-comments rule); object-payload test asserts decoder check stats stay zero for original/zeros/ones (AU parity covers header+directory only, untouched by payload fill); cargo check -p ec-truehd --all-targets clean

Browse files at this commit

edad6c6e483e3ed60a10e393751870815fec04dfAhmet Kaan GümüşParent: edf6783
crates/ec-truehd/src/sync.rsmodified+2 -0
@@ -106,7 +106,9 @@ pub struct MajorSyncInfo {
106 /// L/R, 1 = C, 2 = LFE, 3 = Ls/Rs, 6 = Lrs/Rrs; `0x4F` is standard 7.1);106 /// L/R, 1 = C, 2 = LFE, 3 = Ls/Rs, 6 = Lrs/Rrs; `0x4F` is standard 7.1);
107 /// 0 when the major sync is plain MLP, which has no such field.107 /// 0 when the major sync is plain MLP, which has no such field.
108 pub ch8_assignment: u16,108 pub ch8_assignment: u16,
109+ #[allow(missing_docs)]
109 pub num_substreams: usize,110 pub num_substreams: usize,
111+ #[allow(missing_docs)]
110 pub len: usize,112 pub len: usize,
111 }113 }
112 114
crates/ec-truehd/tests/it/atmos_synth.rsmodified+9 -3
@@ -212,9 +212,15 @@ fn object_substream_contents_do_not_change_the_pcm_output() {
212 let zeros = convert(&originals, |au, n| with_object_payload(au, n, 0x00));212 let zeros = convert(&originals, |au, n| with_object_payload(au, n, 0x00));
213 let ones = convert(&originals, |au, n| with_object_payload(au, n, 0xFF));213 let ones = convert(&originals, |au, n| with_object_payload(au, n, 0xFF));
214 assert_ne!(zeros, originals, "the object payload was replaced");214 assert_ne!(zeros, originals, "the object payload was replaced");
215- let (a, _) = decode_all(&originals);215+ let (a, sa) = decode_all(&originals);
216- let (b, _) = decode_all(&zeros);216+ let (b, sb) = decode_all(&zeros);
217- let (c, _) = decode_all(&ones);217+ let (c, sc) = decode_all(&ones);
218+ for s in [sa, sb, sc] {
219+ assert_eq!(s.parity_failures, 0, "substream parity");
220+ assert_eq!(s.restart_crc_failures, 0, "restart header CRC");
221+ assert_eq!(s.lossless_check_failures, 0, "lossless check");
222+ assert_eq!(s.length_mismatches, 0, "substream lengths");
223+ }
218 assert!(!a.is_empty());224 assert!(!a.is_empty());
219 assert!(a == b, "object payload of zeros changes the PCM");225 assert!(a == b, "object payload of zeros changes the PCM");
220 assert!(a == c, "object payload of ones changes the PCM");226 assert!(a == c, "object payload of ones changes the PCM");