Initial public release of rem-essentials

This commit is contained in:
Nekura
2026-08-11 16:48:50 +02:00
commit 59d55f675c
161 changed files with 9792 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
#include "codec.h"
#include "offsets.h"
#include "patch.h"
#include "config.h"
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
void codec::init()
{
// adoxa created a plugin called MP3 Codec Fix which fixes the "missing MP3 codec" spew warning the right way.
// However, supposedly this fix doesn't work on Wine (probably due to the missing Fraunhofer codec), despite the audio working just fine.
// Hence we apply patches to wipe out the MP3 codec spew warnings on Wine only.
if (!config::is_wine())
return;
//Patch out MP3 warnings
auto soundManager = (DWORD) GetModuleHandleA("soundmanager.dll");
if (soundManager)
patch::patch_uint8(soundManager + F_OF_SOUNDMAN_MP3, 0xC3);
auto soundStreamer = (DWORD) GetModuleHandleA("soundstreamer.dll");
if (soundStreamer)
patch::patch_uint8(soundStreamer + F_OF_SOUNDSTR_MP3, 0xC3);
}