Final Burn Neo > FBN Development

Fix for a longstanding CPS-2 bug

(1/1)

iq_132:
Here's a bug that's been in FBA for quite some time now (since 0.2.95.21 IIRC).  Basically, if you run a game, click "Sound disabled", and then run a CPS game with Q-Sound (every cps2 game & some cps1), FBA crashes. ^^. I don't remember if anyone's come up with a fix for it, so here's mine.

src/burn/capcom/qs_c.cpp

After:


--- Code: ---#include "burn_sound.h"

--- End code ---

Add this:


--- Code: ---extern int nAudSampleRate;

--- End code ---

After:


--- Code: ---int QscUpdate(int nEnd)
{
int nLen;

if (nEnd > nBurnSoundLen) {
nEnd = nBurnSoundLen;
}

nLen = nEnd - nPos;

if (nLen <= 0) {
return 0;
}

--- End code ---

Add this:


--- Code: --- if (nAudSampleRate <= 0) // Fix "Sound disabled" crash on CPS-2
return 0;

--- End code ---

That's it. ^^

CaptainCPS:
ThanX IQ!  :biggrin: I didnt notice that bug until now, I updated my personal build and its doing fine now ^^

Take Care! SeeYaa!!
 :biggrin:

iq_132:
Absolutely one of the things I love about open-source software -- I really enjoy seeing the different ways of going about doing the same thing people come up with.  :smilie:

Leaf:

--- Quote from: doomking on February 12, 2007, 03:26:33 AM ---src/burn/capcom/qs.cpp
find:replace with:
src/burn/capcom/qs_c.cpp
find:replace with:

--- End quote ---
Yes, emufan has fixed this before . :>

Barry Harris:
pBurnSoundOut is the preferred fix btw.

Navigation

[0] Message Index

Go to full version