mirror of
https://github.com/libretro/FreeIntv.git
synced 2024-11-24 08:59:51 +00:00
Merge pull request #8 from libretro/recompileorg-sound-patch-1
Fixes crackling sound in some games
This commit is contained in:
commit
fcf5b381fb
@ -257,12 +257,14 @@ void retro_run(void)
|
||||
|
||||
for(i=0; i<audioSamples; i++)
|
||||
{
|
||||
Audio(PSGBuffer[(int)audioBufferPos], PSGBuffer[(int)audioBufferPos]); // Audio(left, right)
|
||||
Audio(PSGBuffer[(int)(audioBufferPos)], PSGBuffer[(int)(audioBufferPos)]); // Audio(left, right)
|
||||
|
||||
audioBufferPos += audioInc;
|
||||
|
||||
audioBufferPos = audioBufferPos * (audioBufferPos<(PSGBufferSize-1));
|
||||
}
|
||||
audioBufferPos = 0.0;
|
||||
PSGFrame();
|
||||
}
|
||||
|
||||
// Swap Left/Right Controller
|
||||
|
@ -127,6 +127,11 @@ void PSGInit()
|
||||
readRegisters();
|
||||
}
|
||||
|
||||
void PSGFrame()
|
||||
{
|
||||
PSGBufferPos = 0;
|
||||
}
|
||||
|
||||
void PSGNotify(int adr, int val) // PSG Registers Modified 0x01F0-0x1FD (called from writeMem)
|
||||
{
|
||||
readRegisters();
|
||||
|
@ -24,6 +24,7 @@ int PSGBufferPos; // points to next location in output buffer
|
||||
int PSGBufferSize;
|
||||
|
||||
void PSGInit();
|
||||
void PSGFrame(); // Notify New Frame
|
||||
void PSGTick(int ticks); // ticks PSG some number of cpu cycles
|
||||
void PSGNotify(int adr, int val); // updates PSG on register change
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user