Page 1 of 1

Music Freeze Hook

Posted: Fri Jun 12, 2020 4:54 pm
by JeremyaFr
Hello,

I've created a hook (xwa_hook_music) that fixes the music freeze.

It replaces the DirectSound API with the XAudio2 API to play the music.
With this hook, it is no longer needed to set the process affinity mask to a single core.

Feel free to say if you have the music freeze again (even with this hook) or if you no longer encounter the music freeze.

You can download the hook with the XwaHooksSetup tool.

Re: Music Freeze Hook

Posted: Sun Jun 14, 2020 1:16 pm
by Rookie_One1
Thanks Jeremy, you are a programming god!

Re: Music Freeze Hook

Posted: Sun Jun 14, 2020 7:23 pm
by Chri360936
When I run the hooks setup app, I am not getting the new music hook? Any reason for this that you can think of?

Re: Music Freeze Hook

Posted: Sun Jun 14, 2020 7:38 pm
by JeremyaFr
Hello,
You have to delete the "Hooks" directory, as written in the XwaHooksSetup's readme file.

Or extract XwaHooksSetup.zip to a new directory and run XwaHooksSetup.exe

Re: Music Freeze Hook

Posted: Sun Jun 14, 2020 7:40 pm
by Chri360936
Got it. Thanks.

Re: Music Freeze Hook

Posted: Mon Jun 15, 2020 3:16 pm
by DarHan
Huh. I just experienced the music freeze bug despite having installed the hook. It happened after a few minutes of playing (Battle 4, mission 6—more precisely, shortly after the ISD Avenger first started deploying fighters).

Re: Music Freeze Hook

Posted: Tue Jun 16, 2020 9:38 am
by BenKenobi
Hi.
It happened to me too unfortunately. Just after entering hyperspace on Battle 1 Mission 4.
Need more info? Just let me know.

Re: Music Freeze Hook

Posted: Wed Jun 17, 2020 2:44 pm
by Ace Antilles
DarHan wrote:
Mon Jun 15, 2020 3:16 pm
Huh. I just experienced the music freeze bug despite having installed the hook. It happened after a few minutes of playing (Battle 4, mission 6—more precisely, shortly after the ISD Avenger first started deploying fighters).
BenKenobi wrote:
Tue Jun 16, 2020 9:38 am
Hi. It happened to me too unfortunately. Just after entering hyperspace on Battle 1 Mission 4.
Need more info? Just let me know.
Just to confirm please: You both have Hook_Music.dll and Xaudio2_9redist.dll in your main XWA folder?

Also in DDraw.cfg that this file has a setting of 0 in this section

Code: Select all

; ProcessAffinityCore = int value
; When set to 0, the process affinity is not changed
; The value indicates the core you want the process to run on
ProcessAffinityCore = 0

Re: Music Freeze Hook

Posted: Wed Jun 17, 2020 4:01 pm
by DarHan
Yup, both files are present (XWA won’t even start if Xaudio2_9redist.dll is missing), and I double-checked the ProcessAffinityCore setting.

Re: Music Freeze Hook

Posted: Wed Jun 17, 2020 6:08 pm
by BenKenobi
Ace Antilles wrote:
Wed Jun 17, 2020 2:44 pm
Just to confirm please: You both have Hook_Music.dll and Xaudio2_9redist.dll in your main XWA folder?
No, it seems the Xaudio2_9redist.dll was missing, I had no problem launching XWA without it however. Double checked; the ProcessAffinityCore is set to 0

I will check it again and report back.

Re: Music Freeze Hook

Posted: Wed Jun 17, 2020 6:13 pm
by Ace Antilles
BenKenobi wrote:
Wed Jun 17, 2020 6:08 pm
Ace Antilles wrote:
Wed Jun 17, 2020 2:44 pm
Just to confirm please: You both have Hook_Music.dll and Xaudio2_9redist.dll in your main XWA folder?
No, it seems the Xaudio2_9redist.dll was missing, I had no problem launching XWA without it however. Double checked; the ProcessAffinityCore is set to 0

I will check it again and report back.
It should be in your Setup folder that the Hook downloader extracted. If it's not then you don't have the latest updates.

Re: Music Freeze Hook

Posted: Thu Jul 02, 2020 4:43 pm
by BenKenobi
Update: Haven’t had a music crash in over 2 weeks so it is fixed for me.

Re: Music Freeze Hook

Posted: Thu Jul 02, 2020 4:48 pm
by JeremyaFr
BenKenobi wrote:
Thu Jul 02, 2020 4:43 pm
Update: Haven’t had a music crash in over 2 weeks so it is fixed for me.
Thanks for the feedback.

Re: Music Freeze Hook

Posted: Mon Mar 22, 2021 7:04 pm
by JeremyaFr
UPDATE

Hello,
I've updated the music hook.

I've fixed a conflict with the effects ddraw dll.

Re: Music Freeze Hook

Posted: Thu Apr 22, 2021 4:35 pm
by GABICV
Hello,

I don't know if I'm the only one but I'm still experiencing music freezes from time to time. It seems to be random. It can happen during tour missions or skirmishes. It also happened once while I was in the flight simulator menu, setting up a skirmish.
Sometimes it freezes after 10 minutes of play, sometimes I can play 1h without issue.

I'm playing on a Steam version with Mega Patch and Update 2.1. I also made sure I have the latest Music Hook.

Re: Music Freeze Hook

Posted: Mon May 23, 2022 7:15 pm
by JeremyaFr
UPDATE

Hello,
I've updated the music hook.

I've fixed a bug where the xwa exe is still alive when the game ends and a custom movie was played.

Re: Music Freeze Hook

Posted: Mon Dec 04, 2023 2:34 pm
by JeremyaFr
UPDATE

Hello,
I've updated the music hook.

You can now control the volume of the briefing sounds with the Concourse SFX Volume setting.