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