Commit graph

28 commits

Author SHA1 Message Date
D G Turner
e53e1e70d4 LASTEXPRESS: Fix Engine Specific ADPCM to work using odd sized buffers 2022-03-31 02:09:57 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
f8881f661b LASTEXPRESS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Bastien Bouclet
1e6640ab33 LASTEXPRESS: Add override keywords 2020-02-09 12:43:15 +01:00
Evgeny Grechnikov
af580eaa85 LASTEXPRESS: save/load sound state
Warning: breaks compatibility with previous savefiles.
They were mostly broken anyway, locking any NPC who
waited for kActionEndSound when savefile was created.
2018-10-20 16:35:23 +03:00
Evgeny Grechnikov
b7b5fbbad2 LASTEXPRESS: support for looped sounds 2018-10-17 23:03:00 +03:00
Evgeny Grechnikov
d561fd8a83 LASTEXPRESS: dynamic adjusting of sound volume
Now it works just like in the original game,
including fading where it is applicable
(e.g. in a passengers list if closing the list while a sound is playing).

By the way, p2s sequence is known as http://oeis.org/A000265 ,
p1s is 4 - A007814, and p2s[i]/2**p1s[i] is just i/16.
It is time to get rid of these arrays.
2018-10-16 23:57:25 +03:00
Evgeny Grechnikov
8162309212 LASTEXPRESS: fix race condition in sound code
SoundEntry::play() calls StreamedSound::setFilterId(),
StreamSound::setFilterId() requires the underlying reference to be alive.
SoundQueue::handleTimer() checks that the stream is still alive
by calling SoundEntry::isFinished(). However, if the stream is finalized
just between calls to SoundEntry::isFinished() and SoundEntry::play(),
the sound mixer frees the stream leading to use-after-free in setFilterId().

Turn off the automatical disposing, delete the stream in SoundEntry::~SoundEntry().
2018-10-16 00:49:07 +03:00
Matthew Hoops
030e4d0608 AUDIO: Make Rewindable- and SeekableAudioStream inherit virtually 2015-08-30 19:53:53 -04:00
Johannes Schickel
3d4f409572 LASTEXPRESS: Make GPL headers consistent in themselves. 2014-02-18 02:39:35 +01:00
Littleboy
1bfd55535f LASTEXPRESS: Disable sound filter reset on each decoded block
The filter id should be computed from the sound entry status for each decoded block. The current code was resulting in blocks being skipped.
2012-07-28 00:58:34 -04:00
Littleboy
0181a464eb LASTEXPRESS: Use filter 16 as default filter for NIS animations
This makes sure the sound is at the correct volume
2012-07-16 23:51:32 -04:00
Littleboy
13c00d4048 LASTEXPRESS: Fix sound in animated sequences 2012-07-14 14:26:22 -04:00
Littleboy
0635d99ec7 LASTEXPRESS: Cleanup
- Add missing initializer/destructors
 - Add some const modifiers
 - Remove some unneeded casts
 - Use enumeration values in switch constructs
2012-07-14 14:26:00 -04:00
Littleboy
732a2c80dd LASTEXPRESS: Remove duplicated include statements 2012-07-14 13:23:54 -04:00
anotherguest
31201f93d8 Last Express: CLIP should use a <int> template to compile correctly. 2011-10-11 09:33:37 +02:00
Littleboy
63e2fe7e7b LASTEXPRESS: Have LastExpress_ADPCMStream inherit directly from Audio::ADPCMStream (as suggested by clone2727) 2011-07-08 22:03:28 -04:00
Littleboy
af2bdfcb59 LASTEXPRESS: Replace existing decodeIMA calls by code using our custom set of IMA and step tables 2011-07-08 06:25:29 -04:00
Littleboy
1a71cd1e21 LASTEXPRESS: Fix typo in filter table 2011-07-08 06:25:27 -04:00
Littleboy
47e9a6ccdc LASTEXPRESS: Move sound filtering to base Sound class
- Rename kSoundStatusRemoved to kSoundStatusClosed
 - Rename kSoundStatusClear2 to kSoundStatusCached
 - Remove sound cache handling
2011-07-04 14:26:31 -04:00
Littleboy
2788cb8bf7 LASTEXPRESS: Update sound timer and sound entry playing
- Move filtering to SoundEntry class
 - Make some methods of SoundEntry class private
 - Add methods to check if a StreamedSound/AppendableSound is done playing
2011-06-29 11:07:28 -04:00
Littleboy
b4ac4988cc LASTEXPRESS: Cleanup comments 2011-06-28 22:54:51 -04:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Matthew Hoops
9d8874c707 AUDIO: Cleanup MS IMA handling
- Split The Last Express' ADPCM to the engine. Using the MS IMA routine was really a hack.
- Fixed stereo MS IMA ADPCM, the old routine was completely wrong.
2011-04-24 23:14:14 -04:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Eugene Sandulenko
86d650926f LASTEXPRESS: Merge in the engine.
svn-id: r53579
2010-10-18 19:17:38 +00:00