Fixed PSG sound which would sometimes not play (regression).

By the way, SPU.cpp should be cleaned up. Some parts are messy and it takes hours to get compiled.
This commit is contained in:
luigi__ 2009-06-20 13:55:56 +00:00
parent c46ab0ca31
commit 869ecc2788
1 changed files with 6 additions and 3 deletions

View File

@ -510,11 +510,14 @@ void SPU_struct::KeyOn(int channel)
default: break;
}
if(thischan.format != 3)
{
if(thischan.double_totlength_shifted == 0)
{
printf("INFO: Stopping channel %d due to zero length\n",channel);
thischan.status = CHANSTAT_STOPPED;
}
}
thischan.double_totlength_shifted = (double)(thischan.totlength << format_shift[thischan.format]);
}