Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

SBEMU dirty hotfix for playback speed on SB Audigy (Live) (Announce)

posted by RayeR Homepage, CZ, 24.01.2025, 19:56

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:

Back to the forum
Board view  Mix view
22208 Postings in 2050 Threads, 396 registered users, 31 users online (0 registered, 31 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum