Opened 3 weeks ago

Last modified 15 hours ago

#15092 new feature request

SWORD1: Implement Windows version of the audio engine

Reported by: lenny892 Owned by: AndywinXp
Priority: low Component: Audio
Version: Keywords:
Cc: Game: Broken Sword 1

Description (last modified by lenny892)

In "Broken Sword: The Shadow of the Templars", several scenes are experiencing audio issues where ambient sounds do not adjust appropriately. These problems have been observed in both the German full version and the English demo version for Windows. Key scenes affected include the street outside the café, the alley opposite the café, and outside the pub in Ireland. In all instances, ambient sounds that should fade or disappear remain unchanged in volume, disrupting the game's immersive experience. These issues were not present in versions prior to ScummVM 2.8.0.

Steps to Reproduce:

  1. Café Scene:
    • Start the game and proceed to the opening scene.
    • Enter the café with George.
  2. Alley Scene:
    • From the café, have George walk to the alley across the street.
  3. Ireland Pub Scene:
    • Navigate to the scene in front of the pub in Ireland.

Expected Behavior:

  • Café and Alley: The street noises should diminish or disappear to allow for location-specific ambient sounds.
  • Ireland Pub: The violin music from inside the pub should be very faint when standing outside.

Actual Behavior:

  • Café and Alley: The volume of street noises remains loud and unchanged, as if George were still directly in front of the café.
  • Ireland Pub: The violin music is almost as loud as if one were inside the pub, despite adjustments to the game's audio settings.

System Information:

  • Operating System: Windows 11 Build 22631.3447
  • ScummVM Version: 2.8.1 (issue also observed in 2.8.0)
  • Game: "Broken Sword: The Shadow of the Templars", both German full version and English demo version for Windows.

Change History (14)

comment:1 by lenny892, 3 weeks ago

Priority: normalhigh

comment:2 by lenny892, 3 weeks ago

Description: modified (diff)

comment:3 by AndywinXp, 3 weeks ago

Summary: Persistent Audio Issues Across Multiple Scenes in "Broken Sword: The Shadow of the Templars" on ScummVM 2.8.0 and 2.8.1SWORD1: Persistent Audio Issues Across Multiple Scenes

Thanks, I'll be looking at this right now. Please, for the future, refrain to set the priority to high; that should be for the developers to set, otherwise it would make noise with other tickets which are really blockers for any next release.

comment:4 by AndywinXp, 3 weeks ago

Priority: highnormal

comment:5 by AndywinXp, 3 weeks ago

Okay, I have an answer for this: I went through the code, through the game scripts and so on and... as stupid as it sounds, this is how it should behave! 😁

Recently we went through a phase of rewriting some parts of the Broken Sword 1 engine, in order to make it as accurate as possibly achievable with respect to the original executable; to do this we had access to the original source code of the game, so every change we made was motivated by the original code.

Now, what you are hearing in those situations of the game is surely jarring, but I compared this to the original running in DOSBox and it sounds exactly the same as ScummVM 2.8.1 (and as our current master).

One might think: "but it was working fine before!". Well... not really, let's put it this way: what was happening was that we were not interpreting some of the game scripts "instructions" correctly before, so even if sound effects sounded "better" before, there were a number of several side effects which could break the experience. Now with the new changes we are offering exactly what the original release offered, in every single aspect. Which is also good for any sort of preservation aspect. 😉

Also with the imminent release of the new Reforged edition I personally would refrain from doing ScummVM-only changes to the engine code, as I'm sure that at Revolution they will be doing any improvements better than we could ever imagine.

Also, the reason why you seemingly are not able to adjust the sound effect of the violin, is because that's on the Music channel, and not on the SFX channel. Try adjusting the Music fader instead.

I hope this answers your doubts about this ticket, thanks for your inquiry!

I'll be closing this in the meantime, as this does not constitute any bug per-se. If you feel that there is definitely a bug that is ours and is not on the original, feel free to reopen it.

comment:6 by AndywinXp, 3 weeks ago

Owner: set to AndywinXp
Resolution: invalid
Status: newclosed

comment:7 by lenny892, 3 weeks ago

Resolution: invalid
Status: closednew

Thank you for the detailed explanation regarding the audio behavior in "Broken Sword: The Shadow of the Templars" as compared to the original DOS version. After your response, I took the initiative to install the original game in DOSBox and can confirm that the audio behaves exactly as you described in ScummVM 2.8.1 and in the original DOS environment.

However, I have also installed and tested the game on Windows 95 and Windows 98 SE systems, using a retro PC setup with a Slot 1 Pentium 2 and a Soundblaster AWE 64 Value. Interestingly, the audio behavior in these Windows versions aligns with how ScummVM functioned prior to version 2.8.0, rather than the DOS version. This discrepancy suggests that the audio behavior might have been different across various platforms for which the game was originally released.

I would like to add that ScummVM has always indicated that it emulates the Windows version of "Broken Sword: The Shadow of the Templars", not the DOS version. Therefore, I believe it would be most accurate for ScummVM to continue to emulate the Windows version faithfully. Those who prefer the DOS experience have the option to use DOSBox.

Considering this, it seems that the game's audio presentation might vary depending on the original system setup, which could be an important aspect for historical accuracy and preservation. I thought this information might be relevant for your ongoing efforts to emulate the game as authentically as possible.

Thank you again for your commitment to maintaining the fidelity of classic games. I appreciate your time and detailed feedback.

Last edited 3 weeks ago by lenny892 (previous) (diff)

comment:8 by AndywinXp, 3 weeks ago

Thanks, this is very insightful. As a matter of fact, the fact that we stated that we support the Windows version is kind of incorrect. When we were given the source code by Revolution in the early 2000s, we were given access to whatever was preserved at the time: the source code (which at its core is DOS based) also contains several Windows specific code; the code of the engine is then tied to some OS specific libraries (to put it simply: drivers).

We were given the DOS version of those drivers, so whichever work was always being done, it was derived from the DOS version. As far as we and Revoluton know, the folder for the Windows 95 engine drivers has long been lost.

The DOS version used a library called Miles Sound System for audio, I don't know about the Windows version, but the high level code controlling the level of the various sounds is apparently the same, so I wouldn't know what's happening there...

I'm not saying that a Windows specific reimplementation will never happen (this really sounds interesting), but it would involve reverse engineering efforts on the executable, so a lot of time and will to do the work.

comment:9 by AndywinXp, 3 weeks ago

Maybe down the line, it would be nice to have ;)

comment:10 by AndywinXp, 3 weeks ago

Priority: normallow
Summary: SWORD1: Persistent Audio Issues Across Multiple ScenesSWORD1: Implement Windows version of the audio engine
Type: defectfeature request

comment:11 by lenny892, 17 hours ago

I would like to add that the differing audio behavior of the Windows version of "Broken Sword: The Shadow of the Templars" compared to the DOS version is something I have observed not only on my retro PC but also in various Windows 9x emulators. Specifically, I installed Windows 95 in DOSBox X (I also tried Windows 98 SE, but the installation failed). Additionally, I tested the game in RetroArch with Windows 98 SE and the RetroArch DOSBox core, as well as with Windows 95/98 SE in PCem.

Emulation could be a viable option to observe the different audio behaviors between the DOS and Windows versions of "Broken Sword" without needing a retro PC. In fact, in the current version of Windows 11, "Broken Sword" can also run natively if the game files are manually copied to the hard drive and Winsword.exe is executed. Note that to play the game on Windows 11, a "Broken Sword" game CD must be inserted in a virtual or physical optical drive.

Furthermore, while you mentioned that ScummVM’s support for "Broken Sword" is based on the DOS version, the graphical user interface in ScummVM suggests otherwise. The Game ID displayed in ScummVM indicates that it is emulating the Windows version, which is somewhat misleading.

Lastly, "Broken Sword" has been the most important and influential game in my life. Therefore, it is crucial to me that the original version remains playable in its authentic form for as long as possible.

Thank you again for your ongoing efforts and dedication to preserving classic games.

comment:12 by lenny892, 16 hours ago

I have noticed that in both the Irish Pub and the "Poste de police" scenes in "Broken Sword: The Shadow of the Templars," certain sound effects are overly dominant and intrusive. For example, in the Irish Pub, the sound of the dishwasher behind the bar is much more prominent than the music played by the violinist. Similarly, in the "Poste de police," the noise of the fan in the inspector's back office is very loud and distracting. These issues were not present in the Windows version of the game or in ScummVM versions prior to 2.8.0. Despite adjusting the audio settings in ScummVM to make the music louder than the sound effects, the problem persists.

As we have established, the current behavior in ScummVM is accurate to the DOS version, which is likely why these sound effects are more prominent. The dominance of certain sound effects, such as the dishwasher in the Pub and the fan in the police station, negatively impacts the game's atmosphere and immersion. These problems suggest that the balance between music and sound effects is not functioning correctly in the current version of ScummVM when compared to the Windows version.

Thank you for your attention to this matter. I hope this information helps in addressing the audio balance issues and brings the ScummVM experience closer to that of the original Windows version.

comment:13 by AndywinXp, 16 hours ago

Thanks! But... did you just repeat everything you just said on the opening post and the first few comments? I already got it the first time 😂 Don't worry! I physically (and I literally mean physically, as right now I'm ill) cannot do this now, but I will do it eventually.

comment:14 by lenny892, 15 hours ago

Thank you for your response and for taking the time to look into this issue, especially while you're not feeling well. I appreciate your efforts and understand that these things take time. My intention was not to be repetitive or to add pressure but simply to provide as much detail as possible to help with troubleshooting.

I hope you get well soon. I'm looking forward to any updates you might have when you're able to work on this. Thank you again for your dedication and for addressing these issues despite your current situation.

Note: See TracTickets for help on using tickets.