Commit Graph

128 Commits

Author SHA1 Message Date
Coen Rampen
cb3a5b8e9f KYRA: Fix LoL character selection MT-32 music
This fixes a problem with the Lands of Lore character selection music. Due to
pitch bend events at the end of the track, two instruments go out of tune when
the track loops. This occurs in both MT-32 and GM tracks, but in GM the pitch
bend is smaller, so it is not very noticable. Westwood fixed this in the CD
version for MT-32 only. This fixes it for MT-32 floppy and both GM versions.
2022-02-23 20:53:42 +01:00
athrxx
8e3c775983 KYRA: (LOK/MAC) - minor sound driver cleanup 2022-02-20 19:09:48 +01:00
athrxx
6771be9de3 KYRA: fix some header dependencies
(currently the compilation depends on the order of the header includes)
2022-02-20 19:09:39 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
athrxx
a939862cec KYRA: (LoK/Mac) - add support for low quality music
(the driver support was already there, this commit just adds the additional menu setting and the necessary adjustments)
2021-12-17 20:29:26 +01:00
athrxx
992887810a KYRA: (LoK/Mac) - implement GMM volume settings
( and some other minor improvements and fixes)
2021-12-11 22:28:57 +01:00
athrxx
9673b0a0ea KYRA: implement idle screen updates
Apparently, as I have been told, there are (still) OS'es with non-compositing window managers which may cause glitches when drawing windows over the ScummVM window, unless the engine keeps updating the screen. So, now we do that, even if there isn't any actual on-screen activity. The whole thing is a bit more tricky than it would appear at first glance, since one misplaced/untimely screen update may cause palette glitches. I have implemented a timer which is reset whenever actual on-screen activity happens. That should work around any such glitches.

Maybe the rates for the timer have to be tweaked some more. I have also added an ifdef so this could be disabled or restricted to certain platforms if required.
2021-12-05 15:18:38 +01:00
athrxx
e751768622 KYRA: (LoK/Mac) - improve sound driver resource loading performance
Starting a sound effect will lock up the mixer thread in a mutex until the sound effect has been loaded and initialized. Which means the music may be disrupted if that period is too long. This commit tries to speed up the process...
2021-12-03 21:30:54 +01:00
athrxx
9f62be6212 KYRA: (LoK/Mac) - fix end sequence music
(Thanks to eriktorbjorn for the Basilisk II testing)
2021-12-03 15:27:13 +01:00
athrxx
1d064f4c84 KYRA: (LoK/Mac) - fix error message 2021-12-01 22:37:37 +01:00
athrxx
18f1382412 KYRA: (LoK/Mac) - cleanup installer archive retrievement
(replace my own ugly code from a7918a49)
2021-11-22 18:39:23 +01:00
Torbjörn Andersson
3054e32278 KYRA: Move Mac file finding code into Util
We use the same method for finding both the unpacked Legend of Kyrandia
executable and the Legend of Kyrandia installer, so there's no need for
duplicate code.
2021-11-22 18:39:23 +01:00
Torbjörn Andersson
a76ce525d2 KYRA: Further Mac/LoK audio driver cleanup
Now that the audio drive uses the same StuffIt archive as the rest of
the engine (thanks for the help with that!), it no longer needs to
verify that the installer file is present.
2021-11-22 18:39:23 +01:00
athrxx
cb1a6a0e38 KYRA: (LoK/Mac) - cleanup Stuffit code
(get rid of separate archive object in the sound code)
2021-11-22 18:39:23 +01:00
Torbjörn Andersson
b88713faef KYRA: Read Mac music resources from the StuffIt installer
The game appears to be entirely playable from the StuffIt installer now,
but I haven't tested past the start of the game.
2021-11-22 18:39:23 +01:00
athrxx
8a2c97233e KYRA: (LoK/Mac) - more sound driver cleanup
(move more code and data to a new class)
2021-11-17 20:07:01 +01:00
athrxx
31832b9dfa KYRA: (LoK/Mac) - minor sound driver cleanup 2021-11-17 20:07:01 +01:00
Orgad Shaneh
da751361a4 KYRA: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
athrxx
ae49267243 KYRA: (LoK/Mac) - fix death / restart sound in Kyragem chamber 2021-11-11 01:46:29 +01:00
athrxx
ecfc1298da KYRA: (LoK/Mac) - tweak save/load at final sequence start
- make sure, that the correct song starts when loading
- also fix the fading
2021-11-10 21:24:24 +01:00
athrxx
c86b2bf3f4 KYRA: (LoK/Mac) - fix music track map
Looks like an original bug to me. It would miss the track when Malcolm appears after first entering the castle.
2021-11-10 21:24:13 +01:00
Orgad Shaneh
14f516282c KYRA: Replace new[]/memset with new[]() 2021-11-10 19:53:15 +01:00
D G Turner
c8bd7716ea KYRA: Fix GCC Signed vs Unsigned Compiler Warning in Assertion 2021-11-10 09:38:23 +00:00
athrxx
7c8adb00f3 KYRA: (LoK/Mac) - minor sound driver fix
(unused feature AFAIK)
2021-11-09 21:21:14 +01:00
athrxx
706e3bc1d8 KYRA: (LoK/Mac) - partially revert dc5992a2 + some cleanup
(that commit which was just meant to silence a couple of gcc warnings actually broke the LQ audio)
2021-11-09 19:41:58 +01:00
athrxx
c5b56b52a7 KYRA: (LoK/Mac) - ensure music restart after playing the flute
The flute will terminate the current background music (verified with emulator), since the flute sound is actually a song itself. This change makes sure that the music restarts when leaving the screen...
2021-11-09 19:41:45 +01:00
athrxx
44af25e9bb KYRA: (LoK/Mac) - minor cleanup 2021-11-09 19:40:35 +01:00
Torbjörn Andersson
9fe231ec0d KYRA: (LoK/Mac) Fix detection of Mac executable
Once an executable has been found, break out of both loops. (I had
renamed mine to use an UTF-8 trademark glyph, and it was found in the
first code page. Not in the second.)
2021-11-09 09:05:18 +01:00
athrxx
dc5992a227 KYRA: fix more gcc warnings 2021-11-09 01:36:49 +01:00
athrxx
e54238c822 KYRA: try to fix RiscOs build
The LoK/Mac sound class was accidently declared inside the ENABLE_EOB ifdef. I don't know whether the riscos build don't have EOB enabled, but this is at least a possible issue that I can see..
2021-11-09 00:44:14 +01:00
athrxx
8fe4c0a2be KYRA: (LoK/Mac) - fix gcc warning 2021-11-08 23:22:47 +01:00
athrxx
0f5e308140 KYRA: (LoK/Mac) - reduce code by adding macros
I put this in an extra commit, since I really can't foresee how this is going to build on certain platforms. I have tested MSVC, GCC and clang, but still...
2021-11-08 22:57:47 +01:00
athrxx
e221cd4a46 KYRA: (LoK/Mac) - add Mac sound support
- The high quality music seems to work fine. I haven't done any extensive comparison with emulation, but all music tracks have been played with asan enabled. I haven't actually finished playing through the game, though (still stuck in the damn fireberry cave), so the finale still needs to be tested...

- I am not sure about the low quality music. It should work, but hasn't really seen much testing. Currently, I don't have any way to switch to the low quality music anyway. Maybe I'll add a launcher option for it.

- The 16bit mode I have been trying to invent doesn't work. Priority was finishing the original sound first.

- GMM volume settings haven't been fully implemented and don't work
2021-11-08 22:56:46 +01:00
D G Turner
2544256a73 KYRA: Remove Redundant Check in PC Speaker v1 Driver
This warning is emitted when using -Wduplicated-branches with GCC.
2021-10-29 03:59:30 +01:00
Benoit Pierre
6585c8e422 KYRA: (LOL) - refactor LoLEngine::snd_loadSoundFile
No functional changes.
2021-10-26 20:26:39 +02:00
Benoit Pierre
cfb9bfc8c9 KYRA: (LOL) - fix invalid use after free
It's possible for `snd_loadSoundFile` to be called with a negative track number (e.g. -1).
2021-10-26 20:26:39 +02:00
athrxx
39a9f86820 KYRA: fix some MSVC warnings 2021-10-24 15:16:19 +02:00
athrxx
072c54318d KYRA: (LOL) - replace sound list char* array with Common::StringArray 2021-10-12 20:45:52 +02:00
antoniou79
04642eef8a ENGINES: Replace checkCD with isolated partial methods
This is PR #3018 "rebased" on the current HEAD, after the conflicts with PR #3003 and me botching the rebase in that PR

Old PR is here: https://github.com/scummvm/scummvm/pull/3018
2021-07-27 20:51:57 +02:00
athrxx
7e8d970ef5 KYRA: change Adlib driver queue to behave more like the original driver
(in case of an overflow drop the oldest sound instead of the newest)
2021-05-01 20:05:50 +02:00
athrxx
682e7f1230 KYRA: fix bug no. 12507 (Background music suddenly turns off in Legend of Kyrandia 2)
(regression from 189ee12c)
2021-05-01 20:05:40 +02:00
athrxx
da4985a76a KYRA: fix bug no. 12472 (Incorrect some sounds in game)
(regression from 78cde14d)
2021-04-30 00:32:31 +02:00
athrxx
0afbbd6b20 KYRA: (LOL) - add support for playable talkie demo 2021-04-27 23:12:12 +02:00
sluicebox
93eeffc84d JANITORIAL: Update old bug tracker numbers 2021-03-03 02:15:05 +02:00
athrxx
9e1e9f1640 KYRA: remove unnecessary declaration 2021-02-11 20:01:24 +01:00
athrxx
3fc39a84dd KYRA: minor adl driver comments cleanup 2021-02-11 20:01:23 +01:00
Alexander Miller
3fb4d67b4e KYRA: Change calling convention of opcode callbacks
Call the opcode functions with a pointer to the parameters instead
of data poiner reference and first parameter. The data pointer is
updated in AdLibDriver::executePrograms() before calling the opcode
function; an opcode can change channel.dataptr if (and only if) it
wants to jump (and is responsible not to change it inadvertently).
2021-01-15 19:07:47 +01:00
Alexander Miller
bfb4a6219f KYRA: Don't depend on struct layout in AdLibDriver::initChannel() 2021-01-15 19:07:47 +01:00
Alexander Miller
094988e242 KYRA: Add helper to check offsets into _soundData 2021-01-15 19:07:47 +01:00
Alexander Miller
dbbe5b8717 KYRA: Reduce nesting level in AdLibDriver::executePrograms() 2021-01-15 19:07:47 +01:00