Kawa-oneechan / SCICompanion

SCI Companion - an editor for Sierra SCI games, altered.
18 stars 7 forks source link

Bug Fixes: Animate View dialog "background" button position update on resize + use resampled audio #28

Closed cdb-boop closed 1 month ago

cdb-boop commented 1 month ago

Two small bug fixes. I built and tested the changes locally.

Bug Fix: Animated View "background" button not updating on window resize

The "background" button was not moving dynamically when resizing the "Animate" dialog for viewing a View animation.

The background button was missing from the Animate dialog button update array.

SCICompanion/SCICompanionLib/Src/Dialogs/AnimateDialog.cpp - Line 137

Old: int rgid[] = { IDOK, IDC_BUTTONPLAY }; New: int rgid[] = { IDOK, IDC_BUTTONBG, IDC_BUTTONPLAY };

Bug Fix: Resampled audio not used

When importing an audio clip above 22050hz for a Message, the resulting audio was stretched and cut short.

It appears that the original audio data was being returned instead of the resampled audio.

SCICompanion/SCICompanionLib/Src/Util/SoundUtil.cpp - Line 251

Old: double f= fpData[i]; New: double f = results[i];