Earlier games did not have a StopSound action record, so
there is at least one scene in nancy2 where, in order to get
a sound to stop playing, the devs just played it again but
with a zero volume. In such cases, we now adjust the
volume of the sound being played without restarting it.
Added a check inside SoundManager that makes sure it
doesn't prematurely create a new Scene state. This fixes
the chain reaction that results in the load/save menu having
clickable Save buttons.
Added an improvement to the ActionRecord processing
code that fixes timing-related issues with secondary movies.
As a result, movies are now better-synchronized than they
ever were in the original engine.
It seems the addition of a minimum volume for sounds only
got added when the sound system was revamped in nancy3.
This fixes an incorrect clock sound playing in the diner
in nancy1.
Added a short interpolation to listener position and sound
panning when changing a scene. This (somewhat) fixes the
audible pop when a loud 3D sound is playing while the
character is moving (e.g. the clock chime in nancy3).
If a sound is already loaded in a channel and we try to re-load it,
or play it for the second time, the sound manager just ignores
the calls and continues playing the sound as normal, rather than
restarting it.
Fixed an issue where certain sound channels wouldn't get
paused when changing state. Collapsed the pause/unpause
functions inside Scene into a single function, and placed it
inside SoundManager.
Added support for 3D sound, as introduced in nancy3.
The original engine used DirectSound 3D, which enabled
for easy sound panning, attenuation based on distance,
and doppler effect simulation. The DS3D algorithm
has only been approximated; in particular, there are some
minor differences when it comes to sound panning.
The new nancy.dat structure is now read correctly by
the engine. As a result, sound channels are no longer
hardcoded, and some new logic has been added to
dialogue condition handling.
Fixed several inaccuracies with reading sound data. Added
enumerations describing the sound playing commands
introduced in nancy3. Added a flag for sound debugging,
which will be used in implementing said play commands.
Implemented the SoundEqualizerPuzzle, used for nancy2's
mixing console sequence. Also extended the SoundManager
to accommodate the need to change volume and playback
rate while a sound is playing.
The samplesPerSec property found in some SoundDescriptions
is no longer ignored. This results in the correct playback of
certain sounds (e.g. the button press sounds in nancy2's
OverrideLockPuzzle).
The Map state no longer reads its data from disk every time it needs to
be opened. The Vampire Diaries scenes where the map music keeps
playing are now respected.
Unlike all later games using the engine, TVD sounds are stored in
an obscure file format (.dwd, DiamondWare Digitized). This commit adds support for uncompressed .dwd files and thus enables audio
in the game.
Moved all hardcoded engine data that changes between games (e.g. number
of items, number of event flags) to a dedicated file and added a function for
accessing it in NancyEngine.
SoundManager is now responsible for loading and storing all common sounds (sounds with their own BOOT chunk). All playSound() calls with a hardcoded channel ID now use the chunk name instead. Also fixed some sound inaccuracies when switching between states.