找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: YoWassup

Proxy_Bink32w — Bink视频API代理DLL [v2.0.0]

[复制链接]
发表于 2026-7-18 00:53:24 | 显示全部楼层
有个小问题,替换音频后,游戏过程中的小地图电影台词会提前播放
正常情况下,触发后EVA提示Incoming Transmission,小地图播放切换动画后,才开始播放小地图电影并播放声音
替换后,EVA刚提示Incoming Transmission,小地图电影的替换声音就开始播放了
回复

使用道具 举报

 楼主| 发表于 2026-7-18 05:18:23 | 显示全部楼层
flactine 发表于 2026-7-18 00:53
有个小问题,替换音频后,游戏过程中的小地图电影台词会提前播放
正常情况下,触发后EVA提示Incoming Trans ...

请尝试新版本 2.0.2 - https://github.com/YoVVassup/Proxy_Bink32w/releases/tag/v.2.0.2。现在,如果存在已配置的音轨,音频将与视频的第一帧同步。
回复

使用道具 举报

发表于 2026-7-18 15:03:16 | 显示全部楼层
YoWassup 发表于 2026-7-17 16:50
请尝试用这个版本替换我之前的代理版本,并提供日志。我已经找到问题所在,并进行了修复;名称搜索功能可以 ...

仍然在EA_WWLOGO.bik上存在问题,奇怪的是,ra2ts_l.bik没有事。
debug.log:
Play_Movie() as Bink!
Bink Error: Error opening file.
Bink Error: Error opening file.

=== Proxy_Bink32w v2.0.1 ===
Target: binkw32_1.0q.dll

BinkSetSoundSystem(6E8F2EC0,02D20848)
BinkSetIO(6E32E6B0)
  Exception: movies01.mix
  Exception: movies02.mix
  Exception: movmd03.mix
  Exception map [movies01.mix]: westlogo.bik -> BinkWAV\RA2\westlogo.wav
  Exception map [movies01.mix]: a00_f00e.bik -> BinkWAV\RA2\a00_f00e.wav
  Exception map [movies01.mix]: a01_f00e.bik -> BinkWAV\RA2\a01_f00e.wav
  Exception map [movies01.mix]: a01_p01e.bik -> BinkWAV\RA2\a01_p01e.wav
  Exception map [movies01.mix]: a01_p02e.bik -> BinkWAV\RA2\a01_p02e.wav
  Exception map [movies01.mix]: a01_p03e.bik -> BinkWAV\RA2\a01_p03e.wav
  Exception map [movies01.mix]: a02_f00e.bik -> BinkWAV\RA2\a02_f00e.wav
  Exception map [movies01.mix]: a02_p01e.bik -> BinkWAV\RA2\a02_p01e.wav
  Exception map [movies01.mix]: a02_p02e.bik -> BinkWAV\RA2\a02_p02e.wav
  Exception map [movies01.mix]: a03_f00e.bik -> BinkWAV\RA2\a03_f00e.wav
  Exception map [movies01.mix]: a03_p01e.bik -> BinkWAV\RA2\a03_p01e.wav
  Exception map [movies01.mix]: a04_f00e.bik -> BinkWAV\RA2\a04_f00e.wav
  Exception map [movies01.mix]: a04_f03e.bik -> BinkWAV\RA2\a04_f03e.wav
  Exception map [movies01.mix]: a04_p01e.bik -> BinkWAV\RA2\a04_p01e.wav
  Exception map [movies01.mix]: a04_p02e.bik -> BinkWAV\RA2\a04_p02e.wav
  Exception map [movies01.mix]: a05_f00e.bik -> BinkWAV\RA2\a05_f00e.wav
  Exception map [movies01.mix]: a05_p01e.bik -> BinkWAV\RA2\a05_p01e.wav
  Exception map [movies01.mix]: a05_p02e.bik -> BinkWAV\RA2\a05_p02e.wav
  Exception map [movies01.mix]: a05_p03e.bik -> BinkWAV\RA2\a05_p03e.wav
  Exception map [movies01.mix]: a06_f00e.bik -> BinkWAV\RA2\a06_f00e.wav
  Exception map [movies01.mix]: a06_p01e.bik -> BinkWAV\RA2\a06_p01e.wav
  Exception map [movies01.mix]: a06_p02e.bik -> BinkWAV\RA2\a06_p02e.wav
  Exception map [movies01.mix]: a07_f00e.bik -> BinkWAV\RA2\a07_f00e.wav
  Exception map [movies01.mix]: a07_p01e.bik -> BinkWAV\RA2\a07_p01e.wav
  Exception map [movies01.mix]: a08_f00e.bik -> BinkWAV\RA2\a08_f00e.wav
  Exception map [movies01.mix]: a08_p01e.bik -> BinkWAV\RA2\a08_p01e.wav
  Exception map [movies01.mix]: a08_p02e.bik -> BinkWAV\RA2\a08_p02e.wav
  Exception map [movies01.mix]: a09_f00e.bik -> BinkWAV\RA2\a09_f00e.wav
  Exception map [movies01.mix]: a09_p01e.bik -> BinkWAV\RA2\a09_p01e.wav
  Exception map [movies01.mix]: a10_f00e.bik -> BinkWAV\RA2\a10_f00e.wav
  Exception map [movies01.mix]: a10_p01e.bik -> BinkWAV\RA2\a10_p01e.wav
  Exception map [movies01.mix]: a10_p02e.bik -> BinkWAV\RA2\a10_p02e.wav
  Exception map [movies01.mix]: a11_f00e.bik -> BinkWAV\RA2\a11_f00e.wav
  Exception map [movies01.mix]: a11_p01e.bik -> BinkWAV\RA2\a11_p01e.wav
  Exception map [movies01.mix]: a11_p02e.bik -> BinkWAV\RA2\a11_p02e.wav
  Exception map [movies01.mix]: a11_p03e.bik -> BinkWAV\RA2\a11_p03e.wav
  Exception map [movies01.mix]: a12_f00e.bik -> BinkWAV\RA2\a12_f00e.wav
  Exception map [movies01.mix]: a12_p01e.bik -> BinkWAV\RA2\a12_p01e.wav
  Exception map [movies01.mix]: a12_p02e.bik -> BinkWAV\RA2\a12_p02e.wav
  Exception map [movies01.mix]: a13_f00e.bik -> BinkWAV\RA2\a13_f00e.wav
  Exception map [movies01.mix]: a13_f01e.bik -> BinkWAV\RA2\a13_f01e.wav
  Exception map [movies01.mix]: a13_f02e.bik -> BinkWAV\RA2\a13_f02e.wav
  Exception map [movies02.mix]: s01_f00e.bik -> BinkWAV\RA2\s01_f00e.wav
  Exception map [movies02.mix]: s01_p01e.bik -> BinkWAV\RA2\s01_p01e.wav
  Exception map [movies02.mix]: s02_f00e.bik -> BinkWAV\RA2\s02_f00e.wav
  Exception map [movies02.mix]: s02_p01e.bik -> BinkWAV\RA2\s02_p01e.wav
  Exception map [movies02.mix]: s02_p02e.bik -> BinkWAV\RA2\s02_p02e.wav
  Exception map [movies02.mix]: s02_p03e.bik -> BinkWAV\RA2\s02_p03e.wav
  Exception map [movies02.mix]: s03_f00e.bik -> BinkWAV\RA2\s03_f00e.wav
  Exception map [movies02.mix]: s03_p01e.bik -> BinkWAV\RA2\s03_p01e.wav
  Exception map [movies02.mix]: s04_f00e.bik -> BinkWAV\RA2\s04_f00e.wav
  Exception map [movies02.mix]: s04_p01e.bik -> BinkWAV\RA2\s04_p01e.wav
  Exception map [movies02.mix]: s04_p02e.bik -> BinkWAV\RA2\s04_p02e.wav
  Exception map [movies02.mix]: s05_f00e.bik -> BinkWAV\RA2\s05_f00e.wav
  Exception map [movies02.mix]: s05_p01e.bik -> BinkWAV\RA2\s05_p01e.wav
  Exception map [movies02.mix]: s05_p02e.bik -> BinkWAV\RA2\s05_p02e.wav
  Exception map [movies02.mix]: s06_f00e.bik -> BinkWAV\RA2\s06_f00e.wav
  Exception map [movies02.mix]: s06_p01e.bik -> BinkWAV\RA2\s06_p01e.wav
  Exception map [movies02.mix]: s06_p02e.bik -> BinkWAV\RA2\s06_p02e.wav
  Exception map [movies02.mix]: s06_p03e.bik -> BinkWAV\RA2\s06_p03e.wav
  Exception map [movies02.mix]: s07_f00e.bik -> BinkWAV\RA2\s07_f00e.wav
  Exception map [movies02.mix]: s07_p01e.bik -> BinkWAV\RA2\s07_p01e.wav
  Exception map [movies02.mix]: s07_p02e.bik -> BinkWAV\RA2\s07_p02e.wav
  Exception map [movies02.mix]: s08_f00e.bik -> BinkWAV\RA2\s08_f00e.wav
  Exception map [movies02.mix]: s08_p01e.bik -> BinkWAV\RA2\s08_p01e.wav
  Exception map [movies02.mix]: s09_f00e.bik -> BinkWAV\RA2\s09_f00e.wav
  Exception map [movies02.mix]: s09_p01e.bik -> BinkWAV\RA2\s09_p01e.wav
  Exception map [movies02.mix]: s10_f00e.bik -> BinkWAV\RA2\s10_f00e.wav
  Exception map [movies02.mix]: s10_p01e.bik -> BinkWAV\RA2\s10_p01e.wav
  Exception map [movies02.mix]: s10_p02e.bik -> BinkWAV\RA2\s10_p02e.wav
  Exception map [movies02.mix]: s10_p03e.bik -> BinkWAV\RA2\s10_p03e.wav
  Exception map [movies02.mix]: s11_f00e.bik -> BinkWAV\RA2\s11_f00e.wav
  Exception map [movies02.mix]: s11_p01e.bik -> BinkWAV\RA2\s11_p01e.wav
  Exception map [movies02.mix]: s11_p03e.bik -> BinkWAV\RA2\s11_p03e.wav
  Exception map [movies02.mix]: s11_p04e.bik -> BinkWAV\RA2\s11_p04e.wav
  Exception map [movies02.mix]: s12_f00e.bik -> BinkWAV\RA2\s12_f00e.wav
  Exception map [movies02.mix]: s12_p01e.bik -> BinkWAV\RA2\s12_p01e.wav
  Exception map [movies02.mix]: s13_f00e.bik -> BinkWAV\RA2\s13_f00e.wav
  Exception map [movies02.mix]: s13_f01e.bik -> BinkWAV\RA2\s13_f01e.wav
  Exception map [movmd03.mix]: a00_f00e.bik -> BinkWAV\RA2YR\a00_f00e.wav
  Exception map [movmd03.mix]: a01_f00e.bik -> BinkWAV\RA2YR\a01_f00e.wav
  Exception map [movmd03.mix]: a01_f04e.bik -> BinkWAV\RA2YR\a01_f04e.wav
  Exception map [movmd03.mix]: a01_p01e.bik -> BinkWAV\RA2YR\a01_p01e.wav
  Exception map [movmd03.mix]: a01_p02e.bik -> BinkWAV\RA2YR\a01_p02e.wav
  Exception map [movmd03.mix]: a01_p03e.bik -> BinkWAV\RA2YR\a01_p03e.wav
  Exception map [movmd03.mix]: a02_f00e.bik -> BinkWAV\RA2YR\a02_f00e.wav
  Exception map [movmd03.mix]: a02_p01e.bik -> BinkWAV\RA2YR\a02_p01e.wav
  Exception map [movmd03.mix]: a02_p02e.bik -> BinkWAV\RA2YR\a02_p02e.wav
  Exception map [movmd03.mix]: a02_p03e.bik -> BinkWAV\RA2YR\a02_p03e.wav
  Exception map [movmd03.mix]: a03_f00e.bik -> BinkWAV\RA2YR\a03_f00e.wav
  Exception map [movmd03.mix]: a03_p01e.bik -> BinkWAV\RA2YR\a03_p01e.wav
  Exception map [movmd03.mix]: a03_p02e.bik -> BinkWAV\RA2YR\a03_p02e.wav
  Exception map [movmd03.mix]: a03_p03e.bik -> BinkWAV\RA2YR\a03_p03e.wav
  Exception map [movmd03.mix]: a03_p04e.bik -> BinkWAV\RA2YR\a03_p04e.wav
  Exception map [movmd03.mix]: a04_f00e.bik -> BinkWAV\RA2YR\a04_f00e.wav
  Exception map [movmd03.mix]: a04_f02e.bik -> BinkWAV\RA2YR\a04_f02e.wav
  Exception map [movmd03.mix]: a04_p01e.bik -> BinkWAV\RA2YR\a04_p01e.wav
  Exception map [movmd03.mix]: a04_p03e.bik -> BinkWAV\RA2YR\a04_p03e.wav
  Exception map [movmd03.mix]: a05_f00e.bik -> BinkWAV\RA2YR\a05_f00e.wav
  Exception map [movmd03.mix]: a05_p01e.bik -> BinkWAV\RA2YR\a05_p01e.wav
  Exception map [movmd03.mix]: a05_p02e.bik -> BinkWAV\RA2YR\a05_p02e.wav
  Exception map [movmd03.mix]: a05_p03e.bik -> BinkWAV\RA2YR\a05_p03e.wav
  Exception map [movmd03.mix]: a06_f00e.bik -> BinkWAV\RA2YR\a06_f00e.wav
  Exception map [movmd03.mix]: a06_p01e.bik -> BinkWAV\RA2YR\a06_p01e.wav
  Exception map [movmd03.mix]: a06_p03e.bik -> BinkWAV\RA2YR\a06_p03e.wav
  Exception map [movmd03.mix]: a06_p04e.bik -> BinkWAV\RA2YR\a06_p04e.wav
  Exception map [movmd03.mix]: a07_f00e.bik -> BinkWAV\RA2YR\a07_f00e.wav
  Exception map [movmd03.mix]: a07_p01e.bik -> BinkWAV\RA2YR\a07_p01e.wav
  Exception map [movmd03.mix]: a07_p02e.bik -> BinkWAV\RA2YR\a07_p02e.wav
  Exception map [movmd03.mix]: a08_f00e.bik -> BinkWAV\RA2YR\a08_f00e.wav
  Exception map [movmd03.mix]: s01_f00e.bik -> BinkWAV\RA2YR\s01_f00e.wav
  Exception map [movmd03.mix]: s01_p01e.bik -> BinkWAV\RA2YR\s01_p01e.wav
  Exception map [movmd03.mix]: s01_p02e.bik -> BinkWAV\RA2YR\s01_p02e.wav
  Exception map [movmd03.mix]: s01_p03e.bik -> BinkWAV\RA2YR\s01_p03e.wav
  Exception map [movmd03.mix]: s02_f00e.bik -> BinkWAV\RA2YR\s02_f00e.wav
  Exception map [movmd03.mix]: s02_p01e.bik -> BinkWAV\RA2YR\s02_p01e.wav
  Exception map [movmd03.mix]: s03_f00e.bik -> BinkWAV\RA2YR\s03_f00e.wav
  Exception map [movmd03.mix]: s03_p01e.bik -> BinkWAV\RA2YR\s03_p01e.wav
  Exception map [movmd03.mix]: s03_p02e.bik -> BinkWAV\RA2YR\s03_p02e.wav
  Exception map [movmd03.mix]: s03_p03e.bik -> BinkWAV\RA2YR\s03_p03e.wav
  Exception map [movmd03.mix]: s04_f00e.bik -> BinkWAV\RA2YR\s04_f00e.wav
  Exception map [movmd03.mix]: s04_p01e.bik -> BinkWAV\RA2YR\s04_p01e.wav
  Exception map [movmd03.mix]: s04_p02e.bik -> BinkWAV\RA2YR\s04_p02e.wav
  Exception map [movmd03.mix]: s04_p03e.bik -> BinkWAV\RA2YR\s04_p03e.wav
  Exception map [movmd03.mix]: s05_f00e.bik -> BinkWAV\RA2YR\s05_f00e.wav
  Exception map [movmd03.mix]: s05_p01e.bik -> BinkWAV\RA2YR\s05_p01e.wav
  Exception map [movmd03.mix]: s05_p02e.bik -> BinkWAV\RA2YR\s05_p02e.wav
  Exception map [movmd03.mix]: s06_f00e.bik -> BinkWAV\RA2YR\s06_f00e.wav
  Exception map [movmd03.mix]: s06_p01e.bik -> BinkWAV\RA2YR\s06_p01e.wav
  Exception map [movmd03.mix]: s06_p02e.bik -> BinkWAV\RA2YR\s06_p02e.wav
  Exception map [movmd03.mix]: s07_f00e.bik -> BinkWAV\RA2YR\s07_f00e.wav
  Exception map [movmd03.mix]: s07_p01e.bik -> BinkWAV\RA2YR\s07_p01e.wav
  Exception map [movmd03.mix]: s07_p02e.bik -> BinkWAV\RA2YR\s07_p02e.wav
  Exception map [movmd03.mix]: s08_f00e.bik -> BinkWAV\RA2YR\s08_f00e.wav
Config loaded: 0 audio maps, 3 exceptions, log_wait=0 from C:\WORK\IHTEST\binkw32.cfg
Real DLL loaded: C:\WORK\IHTEST\binkw32_1.0q.dll
Proxied functions resolved: pBinkOpen=10877F00 pBinkDoFrame=10879BC0 pBinkClose=1087A2E0 pBinkWait=1087A3C0
BinkOpen(037A0310,02000000) flags=0x02000000 ptr=10877F00
BinkOpen: BINKIOPROCESSOR mode, first param=037A0310 (custom IO context)
CCFileClass: extracted 'LANGMD.MIX' via vtable
BinkOpen->00000000
BinkGetError()=108B1A80
BinkGetError()=108B1A80
BinkSetSoundSystem(6E8F2EC0,02D20848)
BinkOpenDirectSound(02D20848)
BinkSetIO(6E32E6B0)
BinkOpen(109C1A90,02000000) flags=0x02000000 ptr=10877F00
BinkOpen: BINKIOPROCESSOR mode, first param=109C1A90 (custom IO context)
CCFileClass: extracted 'LANGMD.MIX' via vtable
BinkOpen->10992460
BinkOpen resolved: LANGMD.MIX
No audio mapping for: LANGMD.MIX [632x570]
Tracked video: 10992460 632x570
BinkSetVolume2(10992460,00005999)
BinkDDSurfaceType(048D0210)
BinkDDSurfaceType->0000000A


回复

使用道具 举报

 楼主| 发表于 2026-7-18 16:46:20 | 显示全部楼层
笨030504 发表于 2026-7-18 15:03
仍然在EA_WWLOGO.bik上存在问题,奇怪的是,ra2ts_l.bik没有事。
debug.log:
Play_Movie() as Bink!

问题已定位,需要IHCore侧配合修改。
根本原因
IHCore 使用 BINKIOPROCESSOR (0x02000000) 模式打开 .bik 文件时,传递给 BinkOpen 的第一个参数是 CCFileClass* 指针,该指针指向的是 .mix 归档文件(如 LANGMD.MIX),而不是实际的 .bik 文件(如 EA_WWLOGO.bik)。
代理(Proxy_Bink32w)无法从这个指针中提取正确的 .bik 文件名,因此音频替换功能无法识别正确的文件。
调用流程分析
游戏播放 EA_WWLOGO.bik
  → MixFileClass::Offset("EA_WWLOGO.bik")  // IHCore 拦截
  → CCFileClass 打开 .mix 文件 (LANGMD.MIX)
  → BinkOpen(CCFileClass*, BINKIOPROCESSOR)  // CCFileClass 指向 .mix
  → 代理提取文件名 → 得到 "LANGMD.MIX"(错误)
  → 音频替换不工作
已完成的修复
Proxy_Bink32w (v2.0.2)
- 在 sBinkOpen 中检测 BINKIOPROCESSOR 模式时,优先调用 IHCore 导出的 ExtBink_GetCurrentBikName() 获取正确的 .bik 文件名
- 如果 IHCore 未加载,则回退到从 CCFileClass 提取文件名
IHCore(需要合并 PR)
我已向 IHCore 仓库提交了 PR:https://github.com/Everything-Compatible/IHCore/pull/1
修改内容:
1. ExtBink.h — 添加导出函数声明
2. ExtBink.cpp — 在 MixFileClass_Offset_Impl 中保存原始 .bik 文件名,在 BinkOpen_Impl 后清除
// 新增导出
extern "C" __declspec(dllexport) const char* __stdcall ExtBink_GetCurrentBikName();
// MixFileClass_Offset_Impl 中保存文件名
strncpy_s(g_currentBikName, sizeof(g_currentBikName), filename, _TRUNCATE);
// BinkOpen_Impl 后清除
g_currentBikName[0] = '\0';
向后兼容性
- IHCore 修改完全向后兼容原始 binkw32.dll
- 新增的导出和全局变量在未加载代理时无任何副作用
- 已通过编译验证:0 错误,0 警告
测试结果
- 代理:19 组全部编译通过,306 个测试全部通过
- IHCore:编译成功,导出 ExtBink_GetCurrentBikName@0 已验证存在

https://github.com/YoVVassup/Proxy_Bink32w/releases/tag/v.2.0.2
https://github.com/Everything-Compatible/IHCore/pull/1
回复

使用道具 举报

发表于 2026-7-18 18:47:26 | 显示全部楼层
YoWassup 发表于 2026-7-18 16:46
问题已定位,需要IHCore侧配合修改。
根本原因
IHCore 使用 BINKIOPROCESSOR (0x02000000) 模式打开 .bik ...

收到,已经合并PR,合作愉快,感谢您的工作。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|Archiver|手机版|管理员邮箱|红警DIY论坛 |网站地图

GMT+8, 2026-8-20 12:45 , Processed in 0.048256 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表