aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision
diff options
context:
space:
mode:
authorTorbjörn Andersson2019-01-18 19:19:25 +0100
committerFilippos Karapetis2019-02-10 16:32:02 +0200
commit9785d5007a7754ab988b51a8780d6a3dcc80dce4 (patch)
treec5c3b28c5846c7b65e9ceb0d24b667e9a2641540 /engines/zvision
parent82a1859ad1105b2ae2cc3b15bfc3a92e3bc8736f (diff)
downloadscummvm-rg350-9785d5007a7754ab988b51a8780d6a3dcc80dce4.tar.gz
scummvm-rg350-9785d5007a7754ab988b51a8780d6a3dcc80dce4.tar.bz2
scummvm-rg350-9785d5007a7754ab988b51a8780d6a3dcc80dce4.zip
ZVISION: Boost volume for MPEG cutscenes
The high-resolution videos play back at much lower volume than the original ones. This adds hard-coded values for how much to amplify each cutscene. It's all done by ear, and it does introduce some clipping, but I think it should be acceptable. Of course, it could also be a problem with the audio decoder, so this may be the wrong approach entirely.
Diffstat (limited to 'engines/zvision')
-rw-r--r--engines/zvision/video/video.cpp95
1 files changed, 93 insertions, 2 deletions
diff --git a/engines/zvision/video/video.cpp b/engines/zvision/video/video.cpp
index 01e75a4a3d..54c113dc83 100644
--- a/engines/zvision/video/video.cpp
+++ b/engines/zvision/video/video.cpp
@@ -49,8 +49,99 @@ Video::VideoDecoder *ZVision::loadAnimation(const Common::String &fileName) {
else if (tmpFileName.hasSuffix(".avi"))
animation = new ZorkAVIDecoder();
#if defined(USE_MPEG2) && defined(USE_A52)
- else if (tmpFileName.hasSuffix(".vob"))
- animation = new Video::MPEGPSDecoder();
+ else if (tmpFileName.hasSuffix(".vob")) {
+ // For some reason, we get much lower volume in the hi-res
+ // videos than in the low-res ones. So we artificially boost
+ // the volume here. This is an approximation, but I've tried
+ // to match the old volumes reasonably well.
+ //
+ // Some of these will cause audio clipping. Hopefully not
+ // enough to be noticeable.
+ double amplification = 0.0;
+ if (tmpFileName == "em00d011.vob") {
+ // The finale.
+ amplification = 10.0;
+ } else if (tmpFileName == "em00d021.vob") {
+ // Jack's escape and arrival at Flathead Mesa.
+ amplification = 9.0;
+ } else if (tmpFileName == "em00d032.vob") {
+ // The Grand Inquisitor's speech.
+ amplification = 11.0;
+ } else if (tmpFileName == "em00d122.vob") {
+ // Jack orders you to the radio tower.
+ amplification = 17.0;
+ } else if (tmpFileName == "em3ed012.vob") {
+ // The Grand Inquisitor gets the Coconut of Quendor.
+ amplification = 12.0;
+ } else if (tmpFileName == "g000d101.vob") {
+ // Griff gets captured.
+ amplification = 11.0;
+ } else if (tmpFileName == "g000d111.vob") {
+ // Brog gets totemized. The music seems to be mixed
+ // much softer in this than in the low-resolution
+ // version.
+ amplification = 12.0;
+ } else if (tmpFileName == "g000d122.vob") {
+ // Lucy gets captured.
+ amplification = 14.0;
+ } else if (tmpFileName == "g000d302.vob") {
+ // The Grand Inquisitor visits Jack in his cell.
+ amplification = 13.0;
+ } else if (tmpFileName == "g000d312.vob") {
+ // You get captured.
+ amplification = 14.0;
+ } else if (tmpFileName == "g000d411.vob") {
+ // Propaganda On Parade. No need to make it as loud as
+ // the low-resolution version.
+ amplification = 11.0;
+ } else if (tmpFileName == "pe1ed012.vob") {
+ // Jack lets you in with the lantern.
+ amplification = 14.0;
+ } else if (tmpFileName.hasPrefix("pe1ed")) {
+ // Jack answers the door. Several different ways.
+ amplification = 17.0;
+ } else if (tmpFileName == "pe5ed052.vob") {
+ // You get killed by the guards
+ amplification = 12.0;
+ } else if (tmpFileName == "pe6ed012.vob") {
+ // Jack gets captured by the guards
+ amplification = 17.0;
+ } else if (tmpFileName == "pp1ed022.vob") {
+ // Jack examines the lantern
+ amplification = 10.0;
+ } else if (tmpFileName == "qb1ed012.vob") {
+ // Lucy gets invited to the back room
+ amplification = 17.0;
+ } else if (tmpFileName.hasPrefix("qe1ed")) {
+ // Floyd answers the door. Several different ways.
+ amplification = 17.0;
+ } else if (tmpFileName == "qs1ed011.vob") {
+ // Jack explains the rules of the game.
+ amplification = 16.0;
+ } else if (tmpFileName == "qs1ed021.vob") {
+ // Jack loses the game.
+ amplification = 14.0;
+ } else if (tmpFileName == "uc1gd012.vob") {
+ // Y'Gael appears.
+ amplification = 12.0;
+ } else if (tmpFileName == "ue1ud012.vob") {
+ // Jack gets totemized... or what?
+ amplification = 12.0;
+ } else if (tmpFileName == "ue2qd012.vob") {
+ // Jack agrees to totemization.
+ amplification = 10.0;
+ } else if (tmpFileName == "g000d981.vob") {
+ // The Enterprise logo. Has no low-res version. Its
+ // volume is louder than the other logo animations.
+ amplification = 6.2;
+ } else if (tmpFileName.hasPrefix("g000d")) {
+ // The Dolby Digital and Activision logos. They have no
+ // low-res versions, but I've used the low-resolution
+ // Activision logo (slightly different) as reference.
+ amplification = 8.5;
+ }
+ animation = new Video::MPEGPSDecoder(amplification);
+ }
#endif
else
error("Unknown suffix for animation %s", fileName.c_str());