Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
CINE: OS: Fix Amiga music and sample playing. #2446
Please could you also cherry-pick these to the branch-2-2 branch?
The instrument names are a maximum of 22 characters in length but were previously shortened to a maximum of 8 characters. At least in Amiga versions of Operation Stealth some of the instrument names are longer than 8 characters and failed to be loaded because of this. Raising the limit from 8 to 22 characters fixes this. Addresses bug #11676.
The .AMI files load better with loadSpl function than loadAni. Using loadAni for some of the files resulted in garbled sound when the input data was presumed to be 4-bit although it was 8-bit. Fixes loading of some Amiga samples in Operation Stealth (Not all samples were affected). Addresses bug #11676.
Previously frequency of zero samples crashed the debug version, now they are simply discarded. Also the frequency calculation is done differently in the Amiga version of Operation Stealth than in the Future Wars. This fixes playing samples in Amiga versions of Operation Stealth (Not crashing on frequency of zero samples and playing the samples at their right pitch).
Add support for dividing the playing rate of Paula and SoundFx audio by integers other than 1. This is going to be used in the Cine engine for dividing the playing rate of music in the Amiga version of Operation Stealth by 2 to get it to sound right. Otherwise it sounds too high pitched. This is groundwork for fixing bug #11676.