SPU refactoring, step 1: Goodbye SNDDXThread.

Music doesn't continue playing anymore while the emu is paused.

Feel free to revert.
This commit is contained in:
luigi__ 2009-10-08 18:20:14 +00:00
parent 680c4b3b00
commit 2a0edb3c90
2 changed files with 1 additions and 25 deletions

View File

@ -1198,6 +1198,7 @@ static void StepRunLoop_Core()
{
Lock lock;
NDS_exec<false>();
SPU_Emulate_user();
win_sound_samplecounter = 735;
}
inFrameBoundary = true;

View File

@ -70,24 +70,8 @@ static int issoundmuted;
//////////////////////////////////////////////////////////////////////////////
static volatile bool doterminate;
static volatile bool terminated;
extern volatile int win_sound_samplecounter;
DWORD WINAPI SNDDXThread( LPVOID )
{
for(;;) {
if(doterminate) break;
{
Lock lock;
SPU_Emulate_user();
}
Sleep(10);
}
terminated = true;
return 0;
}
int SNDDXInit(int buffersize)
{
@ -185,10 +169,6 @@ int SNDDXInit(int buffersize)
soundvolume = DSBVOLUME_MAX;
issoundmuted = 0;
doterminate = false;
terminated = false;
CreateThread(0,0,SNDDXThread,0,0,0);
return 0;
}
@ -198,11 +178,6 @@ void SNDDXDeInit()
{
DWORD status=0;
doterminate = true;
while(!terminated) {
Sleep(1);
}
if (lpDSB2)
{
IDirectSoundBuffer8_GetStatus(lpDSB2, &status);