Fix for DMF 27

master
Ashley N. 2023-08-19 16:21:38 -04:00
parent 8add785d78
commit 029b7d654a
1 changed files with 5 additions and 3 deletions

View File

@ -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(