Menu

#6720 SWORD1: Speech cluster file endian detection fails in some Mac variants

Broken Sword 1
closed-fixed
None
5
2014-09-17
2014-08-27
Adam Albrec
No

Hello running into this same bug =>> http://forums.scummvm.org/viewtopic.php?t=5453&postdays=0&postorder=asc&start=0 in OSX ScummVM 1.7.0

Was a work-around ever found??

Related

Bugs: #6720

Discussion

1 2 > >> (Page 1 of 2)
  • Willem Jan Palenstijn

    Please describe the exact problem you're having.

    Include as much detail as possible about which version of Broken Sword you're using, and the symptoms you are seeing/hearing.

     
    • Adam Albrec

      Adam Albrec - 2014-08-27

      Just as mentioned in the link above, am running into a digital static sound in Broken Sword 1 rather than hearing proper speech. Everything else is fine. Am running the original Mac Discs.

       
  • Thierry Crozat

    Thierry Crozat - 2014-08-31

    The issue described in the forum post should be fixed. For the mac version is is now using an heuristic to determine if the speech data is in little or big endian. However while there was no report of it before, there is a possibility that this heuristic does not work in your case.
    What language is your Broken Sword game? So far I only had reports about the English and French versions.

    Can you also please run scummvm on the command line with the -d 8 flag. If you are on MacOS X use Terminal.app and the command should look like "/Applications/ScummVM.app/Contents/MacOS/scummvm -d 8" (without the quotes, but this may need to be adapted depending where your ScummVM application is). This should print something like the following four lines when starting to play Broken Sword 1. Please report what you get:
    Opening hashed: SPEECH1.CLU
    Using uncompressed Speech Cluster
    Mac version: using little endian speech file
    Speech endianness heuristic: average = 20986.150575 for BE and 5069.202101 for LE, computed on 2000 samples)

     
  • Adam Albrec

    Adam Albrec - 2014-09-04

    VERY sorry for the delay getting back to you - just starting a new job.

    Anyway: here is the Terminal message you requested:


    User picked target 'sword1mac' (gameid 'sword1mac')...
    Looking for a plugin supporting this gameid... Sword1
    Starting 'Broken Sword: The Shadow of the Templars (Mac)'
    Starting resource manager
    Opening hashed: swordres.rif
    Starting object manager
    File::open: opening 'SPEECH1.CLF' failed
    File::open: opening 'SPEECH1.CLV' failed
    File::open: opening 'SPEECH1.CL3' failed
    Opening hashed: SPEECH1.CLU
    Using uncompressed Speech Cluster
    Mac version: using little endian speech file
    Speech endianness heuristic: average = 2441.248624 for BE and 76.050025 for LE, computed on 2000 samples)


     
  • Adam Albrec

    Adam Albrec - 2014-09-04

    Not sure what it is asking for with
    SPEECH1.CLF, SPEECH1.CLV & SPEECH1.CL3 these files where not on the discs. Could they be aliases (shortcuts) to files that are present, but named differently?

     
  • Adam Albrec

    Adam Albrec - 2014-09-04

    BTW: Someone else ran into this bug here: http://forums.scummvm.org/viewtopic.php?t=5453 and after analysis, your dev stated that the file might be fooling your system into thinking it is Little Endian, but is in fact Big Endian

    Please see Creizy's reply - as he seemed to have figured out near the end of the first page what was happening.

     
  • Thierry Crozat

    Thierry Crozat - 2014-09-04

    Yes I know of this thread. And I am criezy ;)

    SPEECH1.CLF, SPEECH1.CLV & SPEECH1.CL3 are compressed versions of SPPECH1.CLU using FLAC, Ogg Vorbis and MP3 respectively. You can use our compression tool to generate one of those, which may be useful to get smaller files if you want to play on a phone for example. So the message about those files is not an issue (but now I know you are using the uncompressed SPEECH1.CLU which remove a few possibilities for the bug).

    The forum thread you mention tells me the speech file in the mac version of the game can be little endian (as in the Windows version) or big endian. The mac version I have for example has little endian speech. But two persons in the thread reported that their English version uses big endian speech. So I added an heuristic in our code to automatically detect if the speech is big or little endian and support both. That worked for the English version reported in that forum thread. But it looks like the heuristic is failing in your case. It detects little endian speech, but you may actually have big endian speech.

    Can you confirm you have the English version of the game (and not the French or German version for example)?

    Also can you precise which version of OS X you are using (so that I can build a special version that forces big endian speech and that you can use to test if it works and if that is indeed the issue).

     
  • Adam Albrec

    Adam Albrec - 2014-09-05

    Thierry: Thanks so much for the reply! I would be happy to use the MP3 version, but I suppose if the program can't read Speech.clu to begin with, it also probably won't compress it properly either!

    Anyway, if you have time, would really appreciate trying any patch or build you think would work. LOVE THIS GAME! To answer your question, I am on OSX 10.4.11 (G4 PowerPC version) and the game is in English (Can't tell from the discs if it is US or British release), but from playing this on the PSX, seems identical up to the point the problem begins.

    P.S. am also running "Beneath a Steel Sky", "Day of the Tentacle", "Diskworld", "Full Throttle", "Indiana Jones and the Fate of Atlantis" and "The Dig" and none of the others have had ANY problems so far. MEGA KUDOS - ScummVM is probably the best Open Source Game-App out there!!!!

     

    Last edit: Adam Albrec 2014-09-05
  • Thierry Crozat

    Thierry Crozat - 2014-09-05

    Indeed the compression tool uses the same heuristic to guess the endianess of the speech data. So the compressed speech will not be correct either.

    I made a small fix to the heuristic. But I don't think this will fix your issue (you can try tomorrow with the latest development build from http://buildbot.scummvm.org/builds.html in case I am wrong). There is a bigger issue with this heuristic (basically it tries both little and big endian on a small speech sample to see which one looks the most normal, but it may seriously underestimate the "wrongness" when using the incorrect endianess, which ends up looking better than the correct one). I may have to rewrite it completely. I will have a deeper look this weekend.

     
  • Thierry Crozat

    Thierry Crozat - 2014-09-05

    I changed the code to make the speech endianess detection more robust. Please try the development build tomorrow (or later, there is no rush) from http://buildbot.scummvm.org/builds.html. Then let us know if this fixes the speech for you. If not please run it again with -d 8 and report the output here.

     
    • Adam Albrec

      Adam Albrec - 2014-09-07

      Thierry: Sorry for the delay, once again. The issue is still there, but the Terminal message was a bit different than last time.


      User picked target 'sword1mac' (gameid 'sword1mac')...
      Looking for a plugin supporting this gameid... Sword1
      Starting 'Broken Sword: The Shadow of the Templars (Mac)'
      Starting resource manager
      Opening hashed: swordres.rif
      Starting object manager
      File::open: opening 'SPEECH1.CLF' failed
      File::open: opening 'SPEECH1.CLV' failed
      File::open: opening 'SPEECH1.CL3' failed
      Opening hashed: SPEECH1.CLU
      Using uncompressed Speech Cluster
      Mac version: using little endian speech file
      Speech endianness heuristic: average = 23004.605500 for BE (2000 samples) and 1380.266000 for LE (2000 samples)


       
  • digitall

    digitall - 2014-09-07
    • summary: 'Endian Bug' Broken Sword I speech.clu... --> SWORD1: Speech cluster file endian detection fails in some Mac variants
     
  • digitall

    digitall - 2014-09-07

    artphotodude: Has Criezy's patches fixed this bug? i.e. 8eb82fd6c1c65ad0590462853ade281101068afa and 5450870326d56e42a80a20b5c91fbb07df21d86a

    Am going to set this bug to pending-fixed. If no further update is received within 14 days, it will be closed.

     
    • Adam Albrec

      Adam Albrec - 2014-09-07

      digitali: the issue is still present. Left a reply to the dev working on it.

       
  • digitall

    digitall - 2014-09-07
    • status: open --> pending-fixed
    • assigned_to: Thierry Crozat
     
  • Thierry Crozat

    Thierry Crozat - 2014-09-07
    • status: pending-fixed --> open
     
  • Thierry Crozat

    Thierry Crozat - 2014-09-07

    Let's first confirm that this is an endianness issue before I continue looking in this direction. I added a debugger command that you can use to override the endianness detected for the speech data in the mac version. You can use it with the development version from tomorrow.

    Currently for you it detects little endian, so you can use it to tell ScummVM to assumes it is big endian instead and see if the speech is correct. To do so:
    1) Start Broken Sword
    2) Open the debugger using Crtl+d
    3) In the console that pops up type (without the quotes) "speechEndianness be" and press enter.

    Then report if after this the speech is correct.

    You can also check which one is used by typing "speechEndianness" or set little endian speech by typing "speechEndianness le"

     
    • Adam Albrec

      Adam Albrec - 2014-09-07

      On 9/7/14 11:48 AM, Thierry Crozat wrote:

      So just to verify, this won't be up till tomorrow morning??

      Thanks Again!

       

      Last edit: Adam Albrec 2014-09-07
    • Adam Albrec

      Adam Albrec - 2014-09-08

      ••• THIS DID IT! Speech appears fine now. •••

       

      Last edit: Adam Albrec 2014-09-08
  • Thierry Crozat

    Thierry Crozat - 2014-09-08
    • status: open --> pending-fixed
     
    • Adam Albrec

      Adam Albrec - 2014-09-09

      On 9/8/14 1:21 AM, Thierry Crozat wrote:

      • status: open --> pending-fixed
      • Comment:

      Thank you for your feedback, this confirmed there was an issue with
      the heuristic to determine if the speech is stored using little endian
      or big endian.

      I looked again at the code and I think I found and fixed the issue (I
      already had an inkling when you wrote you were using a PPC Mac, which
      is a big endian system, while I have been testing with a more recent
      intel mac which is a little endian systems; but I could not see what
      the problem was until this morning).

      I have set this issue to pending. Please try again with a development
      built from tomorrow (tuesday) and report whether the speech is now OK
      without having to use the debugger. I am hopeful that it will.


      [bugs:#6720] http://sourceforge.net/p/scummvm/bugs/6720 SWORD1:
      Speech cluster file endian detection fails in some Mac variants

      Status: pending-fixed
      Group: Broken Sword 1
      Created: Wed Aug 27, 2014 01:21 AM UTC by Adam Albrec
      Last Updated: Sun Sep 07, 2014 09:32 PM UTC
      Owner: Thierry Crozat

      Hello running into this same bug =>>
      http://forums.scummvm.org/viewtopic.php?t=5453&postdays=0&postorder=asc&start=0
      in OSX ScummVM 1.7.0

      Was a work-around ever found??


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/scummvm/bugs/6720/
      https://sourceforge.net/p/scummvm/bugs/6720

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions

      The fix worked. Speech was fine without the debugger. Way Cool! Will
      this change be in the main app, or do I need to use the dev build?

      Thanks again!

       

      Related

      Bugs: #6720

  • Thierry Crozat

    Thierry Crozat - 2014-09-08

    Thank you for your feedback, this confirmed there was an issue with the heuristic to determine if the speech is stored using little endian or big endian.

    I looked again at the code and I think I found and fixed the issue (I already had an inkling when you wrote you were using a PPC Mac, which is a big endian system, while I have been testing with a more recent intel mac which is a little endian systems; but I could not see what the problem was until this morning).

    I have set this issue to pending. Please try again with a development built from tomorrow (tuesday) and report whether the speech is now OK without having to use the debugger. I am hopeful that it will.

     
  • Thierry Crozat

    Thierry Crozat - 2014-09-09
    • status: pending-fixed --> closed-fixed
     
1 2 > >> (Page 1 of 2)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.