diff --git a/src/reskit/soundtrack/formats/dmf.rs b/src/reskit/soundtrack/formats/dmf.rs index 3a9a771..a61537a 100644 --- a/src/reskit/soundtrack/formats/dmf.rs +++ b/src/reskit/soundtrack/formats/dmf.rs @@ -582,6 +582,11 @@ impl DmfModule { invalid => return Err( format!( "invalid file: invalid bitrate {}", invalid ) )? }; + + // Fast forward 8 bytes in the DMF stream + // (I have no idea what these fields are used for) + skip( bytes.by_ref(), 8 ); + let mut sample = Sample { name, rate, pitch, amp, bitrate, data: Vec::new() }; println!( "{}:\t{:?}", i, sample ); @@ -591,9 +596,6 @@ impl DmfModule { } samples.push( sample ); - - // Fast forward 8 bytes that are unused at the end of the sample - skip( bytes.by_ref(), 8 ); } Ok(