Opened 7 years ago

Closed 3 years ago

#9829 closed defect (fixed)

AGI: SQX - The Lost Chapter - No sound

Reported by: TarkinMX Owned by: digitall
Priority: normal Component: Engine: AGI
Version: Keywords:
Cc: Game: AGI Fanmade

Description

Tested with the latest stable build and several nightly builds and haven't been able to get any sound.

Change History (23)

comment:1 by darksoul42, 5 years ago

Seconded. I have had this problem for a while now.

comment:2 by digitall, 5 years ago

@darksoul42: Is this a regression? If you test with earlier ScummVM releases i.e. v1.2.0 etc. does this work fine? If so, if you can narrow it down to between two releases, then I can try to bisect and locate the cause (if regression).

comment:3 by darksoul42, 5 years ago

Yes, I also think this is a regression.

I will try narrowing it down in more detail, but if memory serves right:

  • it worked in version 1.7.0, and stopped working, starting with version 1.9.0
  • in 1.9.0 it felt as if the volume was lowered to barely audible levels

comment:4 by darksoul42, 5 years ago

I just backtracked with the older official Ubuntu packages :

  • 1.7.0 :
    ScummVM 1.7.0 (Jul 22 2014 12:00:03)
    Features compiled in: Vorbis FLAC MP3 ALSA SEQ TiMidity RGB zLib MPEG2 FluidSynth Theora AAC FreeType2 JPEG PNG
    
    User picked target 'sqx' (gameid 'agi')...
      Looking for a plugin supporting this gameid... AGI preAGI + v2 + v3
      Starting 'Sierra AGI game'
    Emulating Sierra AGI v2.917
    
    • "PC Speaker Emulator" and "MT-32 Emulator" work
  • 1.8.0 :
    ScummVM 1.8.0 (Feb 27 2016 10:23:51)
    Features compiled in: Vorbis MP3 ALSA SEQ TiMidity RGB zLib MPEG2 Theora FreeType2 JPEG PNG
    
    User picked target 'sqx' (gameid 'agi')...
      Looking for a plugin supporting this gameid... AGI preAGI + v2 + v3
      Starting 'Sierra AGI game'
    AGI: Using PC-BIOS font
    Emulating Sierra AGI v2.917
    
    • "PC Speaker Emulator" is mute.
    • "MT-32 Emulator" yields sound, but I have to boost the sound extremely aggressively to even hear something, and there is amplification noise.

Even the latest versions also have the same behavior as 1.8.0.
So if there was a regression, it must have occurred between 1.7.0 and 1.8.0.

comment:5 by digitall, 5 years ago

@darksoul42: Thanks for confirming. Will check and see if I can replicate and narrow down the cause to an exact commit...

comment:6 by digitall, 5 years ago

Right. Have done a bisection. The regression occurs with this commit:

commit a9b25b53d7a7084941553166abd20a602e83e184
Author: Martin Kiewitz <m_kiewitz@users.sourceforge.net>
Date:   Sun Jan 31 22:14:35 2016 +0100

    AGI: properly implement volume control + sync
    
    Original code did assume that AGI volume level is 0-15
    (0 for silence, 15 for maximum volume). It actually is the
    other way. 0 is maximum, 15 is silence.
    Fixed that. Also implemented sync with ScummVM settings dialog.
    In case "mute" is enabled by the user, any volume changes done by
    scripts are ignored.
    Fixes Manhunter 1 Apple IIgs not getting sound anymore since the
    VM Var cleanup (the script volume change by the scripts didn't
    reach us before)

https://github.com/scummvm/scummvm/commit/a9b25b53d7a7084941553166abd20a602e83e184

This may be related to the other bugs which we have had on AGI engine with volume control ...

comment:8 by digitall, 5 years ago

I think the solution to this would be to rework the AGI engine so that the volume for the game sounds stored in ScummVM's config is the _maximum_ volume level available and the volume set by the game scripts scales inside that range i.e. if the ScummVM output volume range is 0 to 255 and is set to for example 100, then the AGI internal volume from scripts of 0 to 16 is mapped to 0 to 100 etc.

comment:9 by raziel-, 4 years ago

Summary: SQX: The Lost Chapter No soundAGI: SQX - The Lost Chapter - No sound

comment:10 by Alien-Grey, 4 years ago

I"m using Windows 10 and for me the sound only works with ScummVM version 1.7. I'm using MT-32 Emulator for sound and I noticed that ScummVM 1.7 gives me a warning that MT-32 Emulator doesn't work and needs to fall back to something else. After that the sound works.

Later ScummVM builds don't give me that warning and no matter what I select the sound doesn't work.

Version 0, edited 4 years ago by Alien-Grey (next)

comment:11 by Alien-Grey, 3 years ago

I did some more testing and noticed that only MT-32 is working for this game with new builds and the volume is very low.

The funny thing is that I also tried it with DOSBox and I can't get MT-32 sound to work with this game.

comment:12 by tacoadventure, 3 years ago

I just wanted to point out that I have tested in the latest daily build and the current stable build (2.2.0) and this issue is still a problem. I have been able to get sound working on the 1.7.0 build, so something broke AGI fan games sound (specifically Space Quest X: The Lost Chapter [sqx]) quite a while ago and it has yet to be fixed.

comment:13 by digitall, 3 years ago

tacoadventure: Yes. We know the cause i.e. https://bugs.scummvm.org/ticket/9829#comment:6 to https://bugs.scummvm.org/ticket/9829#comment:8 but someone needs to write some code and submit as a pull request to fix this...

comment:14 by digitall, 3 years ago

Sigh. I will take a look at fixing this...

comment:15 by raziel-, 3 years ago

@digitall

/me hugs digitall

comment:16 by Alien-Grey, 3 years ago

That's great. ScummVM is the way to go to play this game. :)

comment:17 by digitall, 3 years ago

Owner: set to digitall
Resolution: fixed
Status: newpending

Right. Have tracked down the cause. The volume workaround already introduced for fangames was not being triggered for SQX as the detection entry was not correctly formatted and was missing either an implicit or explicit setting of the GF_FANMADE feature flag. I have corrected this as https://github.com/scummvm/scummvm/commit/e1fb81c91a2a32688324508d6512758463044e3b so this should now be fixed.

comment:18 by digitall, 3 years ago

P.S. I have also implemented the change I indicated in https://bugs.scummvm.org/ticket/9829#comment:8 as https://github.com/scummvm/scummvm/pull/3160 for review, though that does not block closing this bug if the problem is fixed with just the detection entry change.

comment:19 by Alien-Grey, 3 years ago

I downloaded the latest ScummVM Windows development build and the volume issue isn't fixed with the SQX game.

comment:20 by digitall, 3 years ago

Alien-Grey: You need to reset the volume settings for the game in the ScummVM GUI. The easiest way is to just remove the game entry and redo the "Add Game" detection. Though there is a slight bug in the modified detection table which caused the entry to be missing the name, have corrected so best to do this with the next nightly build which should fix that. Otherwise, volume works fine here. Note that the music does not start until the second Vonster logo.

comment:21 by raziel-, 3 years ago

Confirmed fixed. Sound is back

in reply to:  20 comment:22 by Alien-Grey, 3 years ago

Replying to digitall:

Alien-Grey: You need to reset the volume settings for the game in the ScummVM GUI. The easiest way is to just remove the game entry and redo the "Add Game" detection. Though there is a slight bug in the modified detection table which caused the entry to be missing the name, have corrected so best to do this with the next nightly build which should fix that. Otherwise, volume works fine here. Note that the music does not start until the second Vonster logo.

That did the trick. Glad to hear the sound back. :)

comment:23 by digitall, 3 years ago

Status: pendingclosed
Note: See TracTickets for help on using tickets.