SBEMU dirty hotfix for playback speed on SB Audigy (Live) (Announce)
I tried to localize the commit where it breaks.
The last OK: https://github.com/crazii/SBEMU/releases/tag/UserBuild_2024.02.05_06-40
The 1st broken: https://github.com/crazii/SBEMU/releases/tag/UserBuild_2024.02.06_02-04
I compared source files and only 2 has changed: main.c and au_base.c.
I suspect the code in au_base.c function mixer_speed_lq() that has something to do with interpolation of emulated fs to real sound device fs. So I just tried to reverse 2 lines change and yes, it plays correctly on my SBA (only Doom tested yet). Then I tried the same for current 1.0.0 beta 5 sources and also works for me. But I don't know how this code works and if it didn't break somewhere else and on other sound devices. So it may help if someone else would try it on his HW against official beta 5 if there's no sideeffect and for those with SBA/SBL if fixed the speed.
diff au_base.ok au_base.bad
1020c1020
< const unsigned int inend=(sourcesample/channels) << 12;
---
> const unsigned int inend=(sourcesample/channels - 1) << 12; //for n samples,
interpolation n-1 steps
1047c1047
< intmp2=ipi < total-ch ? intmp1+ch : intmp1;
---
> intmp2=intmp1+ch;
Compiled binary here: http://rayer.g6.cz/download/download.htm#SBEMU_SBA_HOTFIX
p.s. Crazii seems to be currently busy with other stuff so no response on my github issue for a half of year. I'm also busy so I'm happy with this dirty patch and not going to dig deeper inside...
---
DOS gives me freedom to unlimited HW access.
Complete thread:
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - RayeR, 24.01.2025, 19:56 (Announce)
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - Japheth, 25.01.2025, 02:00
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - RayeR, 27.01.2025, 22:10
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - Zyzzle, 28.01.2025, 02:48
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - RayeR, 28.01.2025, 12:27
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - Zyzzle, 28.01.2025, 15:20
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - RayeR, 28.01.2025, 12:27
- SBEMU dirty hotfix for playback speed on SB Audigy (Live) - Zyzzle, 28.01.2025, 02:48