Commit graph

32 commits

Author SHA1 Message Date
Cameron Cawley
288e1aaa3f COMMON: Remove use of fmin/fmax/fminf/fmaxf 2024-01-08 13:07:05 +01:00
Paweł Kołodziejski
06902574b4
GRIM: Janitorial 2022-06-08 01:12:00 +02:00
Paweł Kołodziejski
20cb0ae228
ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski
9ae57ad4c1
GRIM: EMI: Use new math vector and matrix multiplication 2021-12-26 18:45:59 +01:00
Christian Krause
ab828f3f3c GRIM: gracefully handle critical floating point operations 2020-12-08 19:35:54 +01:00
Christian Krause
404ae70687 EMI: Avoid +/-inf values for volumes
Ensure that all math operations are done with floating point
arithmetic to avoid a floating point division by zero for small
values of _volume. In this case, the term in parenthesis would
be evaluated first via integer arithmetic and may produce easily 0.
2014-11-21 19:36:44 +01:00
Christian Krause
36b037c81d EMI: Refactor conversion of sound volume values
- LUA code uses a range of 0 .. 100
- the LUA group volumes are in the range 25 .. 100, otherwise the sound
  group is muted
- residualvm engine uses a range of 0 .. Audio::Mixer::kMaxChannelVolume
- do most of the conversion in lua_v2_sound.cpp
- most parts of the engine will solely use the engine internal range
- only when reading/writing the registry residualvm continues to use
  a special conversion for compatibility with the volume settings
  of the residualvm engine settings
- proper handling of volumes close to 0.0f in SoundTrack::updatePosition()
2014-10-27 01:10:29 +01:00
Joseph Jezak
68bf45f373 EMI: Additional conversions from interest/roll to _rot. 2014-08-19 21:15:18 -04:00
Joni Vähämäki
029b57e3ab EMI: Remap volumes from the range 0-100 to the range 0-255 for the audio mixer. 2014-08-14 17:51:07 +03:00
Joni Vähämäki
2b2b12cf1d EMI: Adjust attenuation of sounds to match the original game better. 2014-08-14 17:51:05 +03:00
Joni Vähämäki
896fd7cb42 EMI: Recalculate volume and balance for positioned sounds when the setup changes. Fixes #996 2014-08-14 17:50:58 +03:00
Joni Vähämäki
23055d20d4 EMI: Do not stop the sound in SoundTrack's destructor since the handle may have been invalidated by derived classes. 2014-08-06 19:43:12 +03:00
Joni Vähämäki
0715853387 EMI: Save and restore sound tracks. 2014-08-06 19:43:08 +03:00
Joni Vähämäki
d9137d0ad3 EMI: Do not expose the sound handle in SoundTrack. 2014-08-06 19:16:58 +03:00
Joni Vähämäki
b3e1ae41de EMI: Implement fading of sound tracks. 2014-08-06 19:16:50 +03:00
Joni Vähämäki
5e91f17ee0 EMI: Implement synching of music tracks. 2014-08-06 19:16:49 +03:00
Joel Teichroeb
0f3da43694 GRIM: Change NULL to nullptr. 2014-05-30 17:43:08 -07:00
Pawel Kolodziejski
8759900b6a ALL: synced with ScummVM 2014-04-05 18:18:42 +02:00
Christian Krause
d58b770b0b EMI: Fix unstoppable sound
- if a pre-loaded sound is played again once the previous one is still
  playing, it can't be stopped
- there is only one sound handle, but the mixer would create two
  channels (indexed by the sound handle)
- so the channel created first could not be addressed any more
- stopping the sound (per handle) would not work

current work around: don't start one handle twice

other possible solution: make sure the mixer finds all channels which
play one handle (may require changes to common scummvm code)
2013-12-11 23:23:27 +01:00
Christian Krause
0cd05849fd EMI: Add volume/balance support to Poolsound/Track
Add volume and balance support. If a track is already playing, update
the values via the mixer accordingly.
2013-11-28 01:34:26 +01:00
Einar Johan Trøan Sømåen
fe3883cecd GRIM: Reformat code to be closer to convention. 2013-07-09 21:12:55 +02:00
Joel Teichroeb
4eb508cb61 GRIM: Use const references for strings 2013-07-07 20:56:24 -07:00
Joel Teichroeb
4ccdf870c4 EMI: Use correct name for kPlainSoundType 2013-07-07 15:51:58 -07:00
Joel Teichroeb
2fb1c9f7c0 EMI: Initialize SoundTrack::_soundType 2013-07-07 14:37:20 -07:00
Paweł Kołodziejski
175620b62a ALL: change license headers from LGPL to GPL, and few updates 2012-12-19 23:15:43 +01:00
Einar Johan Trøan Sømåen
d4aed45695 EMI: Implement ImPushState/ImPopState/ImFlushStack 2012-11-21 17:23:25 +01:00
Dries Harnie
64de0c3199 EMI: SoundTrack destructor destroys _stream if needed 2012-09-09 17:50:18 +02:00
Dries Harnie
f29379420e EMI: SoundTracks don't always dispose of their streams 2012-09-09 16:44:44 +02:00
Dries Harnie
6f6840c8ce EMI: Hackfix! Do not dispose of PoolSound->track 2012-09-01 17:32:55 +02:00
Einar Johan T. Sømåen
6668354920 EMI: Initialize SoundTrack properly. 2012-01-30 19:59:36 +01:00
Einar Johan T. Sømåen
2fb0bafc14 EMI: Move emisound into the emi-subfolder 2012-01-29 16:29:14 +01:00
Renamed from engines/grim/emisound/track.cpp (Browse further)