Music Freeze Hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Post Reply

Music Freeze Hook

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2649
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Jun 12, 2020 4:54 pm

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.

Rookie_One1
Lieutenant Commander
Rebel Alliance
Posts: 1518
Joined: Thu Feb 26, 2004 12:01 am

Post by Rookie_One1 » Sun Jun 14, 2020 1:16 pm

Thanks Jeremy, you are a programming god!
Rookie One, is that you?? - Ru Merleen, Rebel Spy at Imdaar Alpha
Current Holder of the Frying Pan of Death

Chri360936
Cadet 3rd Class
Posts: 28
Joined: Thu Jun 20, 2019 3:28 am

Post by Chri360936 » Sun Jun 14, 2020 7:23 pm

When I run the hooks setup app, I am not getting the new music hook? Any reason for this that you can think of?

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2649
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sun Jun 14, 2020 7:38 pm

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

Chri360936
Cadet 3rd Class
Posts: 28
Joined: Thu Jun 20, 2019 3:28 am

Post by Chri360936 » Sun Jun 14, 2020 7:40 pm

Got it. Thanks.

User avatar
DarHan
Cadet 1st Class
Rebel Alliance
Posts: 248
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » 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).
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

User avatar
BenKenobi
Cadet 2nd Class
Posts: 88
Joined: Wed Mar 18, 2020 12:30 pm

Post by BenKenobi » 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.

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4774
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Jun 17, 2020 2:44 pm

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
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
DarHan
Cadet 1st Class
Rebel Alliance
Posts: 248
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Wed Jun 17, 2020 4:01 pm

Yup, both files are present (XWA won’t even start if Xaudio2_9redist.dll is missing), and I double-checked the ProcessAffinityCore setting.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

User avatar
BenKenobi
Cadet 2nd Class
Posts: 88
Joined: Wed Mar 18, 2020 12:30 pm

Post by BenKenobi » 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.

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4774
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed Jun 17, 2020 6:13 pm

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.
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
BenKenobi
Cadet 2nd Class
Posts: 88
Joined: Wed Mar 18, 2020 12:30 pm

Post by BenKenobi » Thu Jul 02, 2020 4:43 pm

Update: Haven’t had a music crash in over 2 weeks so it is fixed for me.

User avatar
JeremyaFr
Commander
XWAU Member
Posts: 2649
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Jul 02, 2020 4:48 pm

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.

Post Reply