MetaAudio icon indicating copy to clipboard operation
MetaAudio copied to clipboard

Stops working with the recent Half-Life 25th Anniversary update

Open megakarlach opened this issue 1 year ago • 22 comments

MetaAudio seems to stop working with this new major update, crashing the game in background as soon when the game started. Checking the View Reliability History on Windows and this happened: image

The dll file shown the image was related to VC++ error, something that most HL1 mods and even games like CS 1.6 also had the same issue.

Game will still work alongside with MetaAudio if the "steam_legacy" beta build was selected, which downgrades the game to the 2020 version.

EDIT: For those who want a workaround and install MetaHookSv + MetaAudio on HL25, see this paste: https://pastebin.com/L5BTxMVW

megakarlach avatar Nov 18 '23 04:11 megakarlach

I will take a look as soon as I am able to, the new update is really neat! Time to replay HL1... But if someone has time available to look at it, feel free to do so. I don't have much time nowadays :( I will review and merge any PR to fix this issue.

LAGonauta avatar Nov 18 '23 15:11 LAGonauta

Valve pushed mutiple breaking changes to engine interfaces and they switched to modern compiler (msvc-v142 or msvc-v143, I'am not sure) which might break the previous found signatures.

Known breaking changes:

class IFileSystem_HL25 : public IBaseInterface
{
public:
	virtual void Mount(void) = 0;
	virtual void Unmount(void) = 0;
	virtual void RemoveAllSearchPaths(void) = 0;
	virtual void AddSearchPath(const char *pPath, const char *pathID = 0) = 0;
	virtual bool RemoveSearchPath(const char *pPath) = 0;
	virtual void RemoveFile(const char *pRelativePath, const char *pathID = 0) = 0;
	virtual void CreateDirHierarchy(const char *path, const char *pathID = 0) = 0;
	virtual bool FileExists(const char *pFileName) = 0;
	virtual bool IsDirectory(const char *pFileName) = 0;
	virtual FileHandle_t Open(const char *pFileName, const char *pOptions, const char *pathID = 0) = 0;
	virtual void Close(FileHandle_t file) = 0;
	virtual void Seek(FileHandle_t file, int pos, FileSystemSeek_t seekType) = 0;
	virtual unsigned Tell(FileHandle_t file) = 0;
	virtual unsigned Size(FileHandle_t file) = 0;
	virtual unsigned Size(const char *pFileName) = 0;
	virtual long GetFileTime(const char *pFileName) = 0;
	virtual long GetFileChangeTime(const char *pFileName) = 0;//<---Added in the latest engine

I sugguest that replace the old metahook with MetaHookSv which has better support for different sorts of engines (blob, 3266, 6354, 8684, HL25)

hzqst avatar Nov 19 '23 02:11 hzqst

Thanks, I will replace it with MetaHookSv. I see that you already added support to the new engine 😁

LAGonauta avatar Nov 19 '23 03:11 LAGonauta

Wait, is it possible to use MetaAudio with the latest update to Half-Life? I redubbed the whole Blue Shift to my native language and used this mod to make it possible. Now it doesn't work and I don't want to use the old version...

remexcz avatar Nov 19 '23 20:11 remexcz

Yes, we are working on it. You can download a preliminary build here if you have a GitHub account.

LAGonauta avatar Nov 19 '23 21:11 LAGonauta

Thank you so much!

remexcz avatar Nov 19 '23 22:11 remexcz

"Compiled binaries not found ! You have to download compiled zip from github release page or compile the sources by yourself before installing !!!"

remexcz avatar Nov 19 '23 22:11 remexcz

"Compiled binaries not found ! You have to download compiled zip from github release page or compile the sources by yourself before installing !!!"

getting the same error

M00nBr1ght avatar Nov 19 '23 22:11 M00nBr1ght

Yeah, the folder structure is not correct yet. However, you can find sndfile.dll, metaaudio.dll, and metahook.exe in that archive and they are all you need.

LAGonauta avatar Nov 19 '23 23:11 LAGonauta

That worked, thanks

remexcz avatar Nov 19 '23 23:11 remexcz

I just want to double check, does the command al_doppler work with the new update? I'm not getting any changes when using it.

Stuphfers avatar Nov 20 '23 02:11 Stuphfers

image getting this error when trying to launch it using a shortcut with the preliminary build, why is this happening?

Lifeisstrange74 avatar Nov 23 '23 21:11 Lifeisstrange74

@Lifeisstrange74 did you also upgrade the metahook.exe? It also needs updating if you didn't.

@Stuphfers it should not affect doppler, unless I need to change how the speed of each entity is calculated due to the engine changes.

LAGonauta avatar Nov 24 '23 00:11 LAGonauta

@Lifeisstrange74 did you also upgrade the metahook.exe? It also needs updating if you didn't.

I was having issues with the program not functioning separately from this issue. I attempted to fix this by installing metahooksv which ironically is causing me to have the same error message as lifeisstrange74... ha... I appreciate your help but I think for right now Im gonna wait for a more stable build. Thank you so much for your continued support of the project!

M00nBr1ght avatar Nov 24 '23 01:11 M00nBr1ght

image getting this error when trying to launch it using a shortcut with the preliminary build, why is this happening?

Valve added bunch of shit to the engine in the buildnum 9891 update which broken the signatures.

See: the spaghetti code after cl_righthand

image

I'm gonna fix this asap.

EDIT: Updated signatures has been committed in the latest build of MetaHookSv.

hzqst avatar Nov 24 '23 03:11 hzqst

Do you think you'll be able to release the stable build in November? I announced that my mod will be released this month, but releasing it isn't possible without MetaAudio. And i just want to say that I appreciate you updating it and by no means want to push you, I fully respect you have more important things to be doing.

remexcz avatar Nov 25 '23 16:11 remexcz

@remexcz I don't think so, just found more issues. Maybe you can use the old engine for now?

@hzqst It seems that cl_time, cl_oldtime, cl_waterlevel, cl_parsecount, and cl_servercount are all wrong with HL25.

cl_time and cl_oldtime are quite easy to fix (your Renderer also uses them), I copied how you search for it in MetaAudio and it worked but I still need to push. This fixes the velocity calculation for the doppler effect.

But I didn't understand the magic to find cl_parsecount and the others, would you mind fixing it when you get the time? I figure it is not trivial. Thank you. These are necessary for various functionalities, such as: freeing the cache on map change, muffling the sound when underwater, setting the audio source origin, and other things.

LAGonauta avatar Nov 26 '23 13:11 LAGonauta

@remexcz I don't think so, just found more issues. Maybe you can use the old engine for now?

@hzqst It seems that cl_time, cl_oldtime, cl_waterlevel, cl_parsecount, and cl_servercount are all wrong with HL25.

cl_time and cl_oldtime are quite easy to fix (your Renderer also uses them), I copied how you search for it in MetaAudio and it worked but I still need to push. This fixes the velocity calculation for the doppler effect.

But I didn't understand the magic to find cl_parsecount and the others, would you mind fixing it when you get the time? I figure it is not trivial. Thank you. These are necessary for various functionalities, such as: freeing the cache on map change, muffling the sound when underwater, setting the audio source origin, and other things.

I've pushed a pr that should address the problem with cl_time, cl_oldtime, cl_waterlevel, cl_parsecount, and cl_servercount.

hzqst avatar Nov 27 '23 06:11 hzqst

I got the preliminary build up and running and it works great! thank you so much.

Mutch0199 avatar Nov 29 '23 16:11 Mutch0199

Hi all,

I'm having crashes almost immediately with the latest build after starting the game and also when loading a save game. Do you know how can I fix this?

Dantrigger avatar Dec 04 '23 06:12 Dantrigger

while waiting for a official release what is the correct folder structure to install metaaudio ?

QcSamuel avatar Dec 30 '23 03:12 QcSamuel

while waiting for a official release what is the correct folder structure to install metaaudio ?

@QcSamuel

|%STEAM%\steamapps\common\Half-Life\
|----> metahook.exe, OpenAL Half-Life, OpenAL Half-Life - OpenAL soft, OpenAL Natural-Selection
|----> sndfile.dll
|----> OpenAL32.dll (remove to use X-Fi hardware acceleration)
|----> <game>\
  |----> metahook\
    |----> plugins\
      |----> MetaAudio.dll
    |----> configs\
      |----> plugins.lst

meetajhu avatar Jul 25 '24 17:07 meetajhu