mirror of https://github.com/snes9xgit/snes9x.git
win32: fix xaudio2 mixing loop
This commit is contained in:
parent
9ac39c43a1
commit
231f4eea8f
|
@ -390,10 +390,8 @@ void CXAudio2::ProcessSound()
|
|||
BYTE * curBuffer;
|
||||
|
||||
UINT32 availableSamples;
|
||||
UINT32 availableBytes;
|
||||
|
||||
availableSamples = S9xGetSampleCount();
|
||||
availableBytes = availableSamples * (Settings.SixteenBitSound ? 2 : 1);
|
||||
|
||||
while(availableSamples > singleBufferSamples && bufferCount < blockCount) {
|
||||
curBuffer = soundBuffer + writeOffset;
|
||||
|
@ -401,5 +399,6 @@ void CXAudio2::ProcessSound()
|
|||
PushBuffer(singleBufferBytes,curBuffer,NULL);
|
||||
writeOffset+=singleBufferBytes;
|
||||
writeOffset%=sum_bufferSize;
|
||||
availableSamples -= singleBufferSamples;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue