Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CINE: OS: Fix Amiga music and sample playing. #2446

Merged
merged 5 commits into from Sep 5, 2020
Merged

Conversation

@karisal
Copy link
Contributor

karisal commented Sep 5, 2020

Hi!
Here are fixes for Amiga music and sample playing in Operation Stealth.
This also slightly touches some common audio source code (See commits
0a4ebbf and 1f28961) but they were done in order to fix playing music
correctly in Amiga versions of Operation Stealth.

Please could you also cherry-pick these to the branch-2-2 branch?
Thank you!

Kari Salminen

karisal added 5 commits Sep 5, 2020
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.
Fix playing pitch of Amiga music in Operation Stealth by halving it.
Fixes bug #11676.
@sev-
Copy link
Member

sev- commented Sep 5, 2020

Thank you! Merging and backporting

@sev- sev- merged commit 3be1744 into scummvm:master Sep 5, 2020
5 checks passed
5 checks passed
Windows (win32, x86-windows, x86, --enable-faad --enable-mpeg2 --disable-fribidi, curl faad2 flui...
Details
Windows (x64, x64, x64-windows, --enable-faad --enable-mpeg2 --disable-fribidi, curl faad2 fluids...
Details
Windows (arm64, arm64, arm64-windows, --enable-faad --enable-mpeg2 --disable-fribidi, curl faad2 ...
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deepcode-ci-bot Well done, no issues found!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.