Menu

Thandor: The Invasion - sound problems

huh
2024-08-17
2024-08-26
<< < 1 2 3 4 > >> (Page 3 of 4)
  • huh

    huh - 2024-08-24

    This version nullifies any sound on my machine.

    I haven't tried it in Win10/11 so I don't know. Are we talking about this file?
    https://github.com/ThreeDeeJay/dsoal/releases/download/latest-c%2B%2B-rewrite/DSOAL.zip

    I didn't have to change at all hardwareBufferCount in Indirectsound from base 128.
    I only did that for the tests.

     

    Last edit: huh 2024-08-24
  • BEEN_Nath_58

    BEEN_Nath_58 - 2024-08-24

    Got it! 63 is the minimum needed for all the sound (as I heard as of now).

    64 is the ideal spot, it is used in the Creative Audigy 2 card which was released in 2002. Quiet a large number of buffers for 2000, I guess

    1c9c:fixme:dsound:DSPrimary_SetPan Not supported
    1c9c:fixme:dsound:DSPrimary_SetPan Not supported

    I forgot to answer this part. This wasn't an issue, nor will be, at least in terms of feature. It is just a panning calculation not implemented in DSOAL when moving the character around a sound source

    Are we talking about this file?

    Yes.

    @ghotik I think the attached screenshot has the place which has the sound buffer issue. As @huh2 already spotted in IndirectSound, since basic acceleration only results in buffercount=0, faking it to a larger value may help

     

    Last edit: BEEN_Nath_58 2024-08-24
  • huh

    huh - 2024-08-24

    @BEEN_Nath_58

    Are we talking about this file?

    Yes.

    Have you tried playing this dsoal with or without DxWnd? (I don't know if the game works without DxWnd in Win11). Because with DxWnd the test result can change, as I wrote in point 1b) here:
    https://sourceforge.net/p/dxwnd/discussion/general/thread/383ad1f1a0/#04a7/28d5/fbc1

    Regarding your github post, it would be good to include the log you get by setting variables to
    set DSOAL_LOGLEVEL=3
    set DSOAL_LOGFILE=dsoal_error.txt

     

    Last edit: huh 2024-08-24
  • BEEN_Nath_58

    BEEN_Nath_58 - 2024-08-24

    I got a pretty curious spot. On Windows 98, turning off the "audio acceleration" completely still restores the audio playback. With audio acceleration put to basic, it works too.

    Somehow, in my guess, the game sees no DirectSound SW sound buffers? It looks more of a logic flaw now, rather than a DirectSound error. Maybe some condition for DSOUND SW is failing. Or it is some kind of the "too much RAM" issue

    DSOAL_LOGFILE:

    Dumbest question but where was I supposed to put it? I literally forgot

     
    • huh

      huh - 2024-08-24

      To a batch file:
      set DSOAL_LOGLEVEL=3
      set DSOAL_LOGFILE=dsoal_error.txt
      thandor.exe
      In the game settings, it is possible to change the graphics to 32bit color, maybe it will work even without DxWnd.
      I haven't tried running a batch file from DxWnd, so I don't know if the game will hook.

       
      • BEEN_Nath_58

        BEEN_Nath_58 - 2024-08-24

        I am a little confused. All builds except ThreeDeeJay ones can output to a logfile, while ThreeDeeJay builds can't.

         
        • huh

          huh - 2024-08-24

          Well I don't know, it works here in Win7 now I tried again. The log was created using my .bat file.
          Are you trying with or without DxWnd?

          P.S.
          I haven't tried his DSOAL+HRTF.zip, only DSOAL.zip

           

          Last edit: huh 2024-08-24
          • BEEN_Nath_58

            BEEN_Nath_58 - 2024-08-24

            only DSOAL.zip

            Yes, it just creates a blank dsoal-error.txt file. On other versions, where you too reported a lack of sound, it worked.

            More importantly, DirectSoundControl (DSC) somewhat plays a few sound effects here and there on some game runs but not on all game executions, without DxWnd. It seems buffers are being used without a good order, or overflowing

            IDirectSoundBuffer::Play: ERROR res=0x887d0009

            The error is 0x887d0003 on Windows Vista, clost but not the same. The error output isn't likely the main culprit for the lack of sound. It is most likely too many sound buffer being used, which DxWnd doesn't output any info about

             
            • huh

              huh - 2024-08-24

              Yes, it just creates a blank dsoal-error.txt file

              Maybe it needs admin permissions?
              I tried DSC as well but never got a working configuration with this game.

               
              • BEEN_Nath_58

                BEEN_Nath_58 - 2024-08-24

                Maybe it needs admin permissions?

                Giving it leads to the file not getting executed. Other DSOAL versions don't need admin rights, and it is away from my system drive. Also the file gets created, which otherwise would fail

                 
  • gho

    gho - 2024-08-25

    About APO errors they seems all listed here: https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/audioenginebaseapo.idl

    in particular:

    cpp_quote("// a pin supporting the format cannot be found.")
    cpp_quote("#define APOERR_FORMAT_NOT_SUPPORTED              _HRESULT_TYPEDEF_(0x887D0003)")
    ...
    cpp_quote("// Invalid connection format for this operation")
    cpp_quote("#define APOERR_INVALID_CONNECTION_FORMAT         _HRESULT_TYPEDEF_(0x887D0009)")
    

    in short, just different ways to say that something is wrong with the audio format.

     
  • gho

    gho - 2024-08-25

    @Been_Nath_58:

    I read in your posts to GitHub that you get an error on a DSOAL version because of the SetPan method returning an error code. If you need it, I could add a flag to DxWnd to bypass the SetPan method so that the execution wouldn't be stopped. Just let me know ...

     
    • BEEN_Nath_58

      BEEN_Nath_58 - 2024-08-25

      THank you, I would be grateful if you can add that experimental feature. That build won't even let me to log the OpenAL functions

       
      • gho

        gho - 2024-08-25

        download it in the release candidate ....

         
        • gho

          gho - 2024-08-25

          I forgot ... to enable the bypass you must set EXPERIMENTAL4. The release was a little hurried, I hope it's fine.

           
          • BEEN_Nath_58

            BEEN_Nath_58 - 2024-08-25

            I still get the:

            167c:fixme:dsound:DSPrimary_SetPan Not supported
            

            in the logs.

            To avoid confusion, I am using:
            https://github.com/ThreeDeeJay/dsoal/releases/download/0.9.5/DSOAL.zip

            Also I sent you a PM

             

            Last edit: BEEN_Nath_58 2024-08-25
  • gho

    gho - 2024-08-25

    My mistake, this is the fixed release ...

     
    • gho

      gho - 2024-08-25

      Tested with 0.9.5/DSOAL.zip, it WORKS !!!

      I'm about to bring wife out for dinner now, I suppose tomorrow I will have plenty of time to dedicate, please be patient ....

       

      Last edit: gho 2024-08-25
      • BEEN_Nath_58

        BEEN_Nath_58 - 2024-08-25

        It works!

        I guess the things majorly necessary were SetPan and hwbuffercount?

        @huh2 can you check?

         
        • huh

          huh - 2024-08-25

          OK, but what should I test?
          This latest release with Experimental flag 4 + what?
          This dsoal 0.9.5? Or something else?

           
          • BEEN_Nath_58

            BEEN_Nath_58 - 2024-08-25

            0.9.5 (or whatever dsoal that didn't work) + this dxwnd rls + exp 4

             
            • huh

              huh - 2024-08-25

              I tried the latest official version which I downloaded on 8/21. and it works now with DxWnd, it doesn't work without it. DsoalXP does not work, or rather works poorly, similarly to without this library. Maybe it has some old code. Dsoal Vaporeon april 23 has the same behavior. Dsoal 0.9.5 does not work at all without DxWnd but it works with DxWnd. So I think it's a nice result, at least with the latest versions of Dsoal.

               

              Last edit: huh 2024-08-25
  • gho

    gho - 2024-08-25

    Now I have some time before going to bed to explain the situation.
    The last release implements a sort of pan emulation rather than a simple bypass: in effect, several methods are involved and probably some work has still to be done, but let's proceed with order to explain the picky logic of this game:

    1. first of all the game creates sound buffers requiring the DSBCAPS_CTRLPAN capability. The DxWnd flag strips the capability flag.
    2. then the SetPan method initializes the pan level to 0. A bypass is necessary to avoid a returned error code
    3. after setting the pan, the game also checks for its value using the GetPan method. Again, this method must be hooked and a positive return code must be returned. Currently the wrapper returns a value 0 for the pan level (that is, centered) but this part should be improved by taking note of the last level set by SetPan and returning it (I do this in the fake-Dsound wrapper)
    4. After all these steps are positively accomplished the game does its job by playing the sound buffers. It should be noted that an error in any of the former steps would block the sound operations completely, so this is why it is essential that no errors are issued.

    So, tomorrow I'm going to polish the functionality a little and promote the EXPERIMENTAL4 flag to an actual flag for the sound panel.
    Also, I would like to understand why other games are using dsound but they don't have the same problem of APOERR error codes and muted sound, I think that emulating the schema of some working game should provide some possibility of success even with the system dsound.dll, though maybe at the price of some adjusted pitch of suppressed capability, who knows?

     
    • BEEN_Nath_58

      BEEN_Nath_58 - 2024-08-26

      I am going to assume you are having the communication with jonpol on email? Let me know where you reach.

      I am currently, discussing on the memory buffers.

       
  • gho

    gho - 2024-08-26

    I got no news from jonpol, maybe you could send me the Vogons link to the thread where he is active, I may give him some more direct link.

    I just posted a new, fixed .rc9 release with a new GUI and the flag "Sound > Emulate pan". This should be it (I fixed another few potential problems) and in any case it is tested and working as the last hurried release.

     
<< < 1 2 3 4 > >> (Page 3 of 4)

Log in to post a comment.