Set a voice as keyed off when its envelope ends.

This commit is contained in:
Unknown W. Brackets 2014-02-02 23:39:55 -08:00
parent 000222f550
commit a00d5a2df8
2 changed files with 5 additions and 4 deletions

View File

@ -99,7 +99,7 @@ u32 sceSasInit(u32 core, u32 grainSize, u32 maxVoices, u32 outputMode, u32 sampl
INFO_LOG(SCESAS, "sceSasInit(%08x, %i, %i, %i, %i)", core, grainSize, maxVoices, outputMode, sampleRate);
sas->SetGrainSize(grainSize);
// Seems like maxVoiecs is actually ignored for all intents and purposes.
// Seems like maxVoices is actually ignored for all intents and purposes.
sas->maxVoices = PSP_SAS_VOICES_MAX;
sas->outputMode = outputMode;
for (int i = 0; i < sas->maxVoices; i++) {
@ -117,7 +117,7 @@ u32 sceSasGetEndFlag(u32 core) {
endFlag |= (1 << i);
}
DEBUG_LOG(SCESAS, "sceSasGetEndFlag(%08x)", endFlag);
DEBUG_LOG(SCESAS, "%08x=sceSasGetEndFlag(%08x)", endFlag, core);
return endFlag;
}

View File

@ -347,7 +347,7 @@ void SasVoice::ReadSamples(s16 *output, int numSamples) {
{
vag.GetSamples(output, numSamples);
if (vag.End()) {
// NOTICE_LOG(SAS, "Hit end of VAG audio");
// NOTICE_LOG(SCESAS, "Hit end of VAG audio");
playing = false;
on = false; // ??
envelope.KeyOff();
@ -464,8 +464,9 @@ void SasInstance::MixVoice(SasVoice &voice) {
if (voice.envelope.HasEnded())
{
// NOTICE_LOG(SAS, "Hit end of envelope");
// NOTICE_LOG(SCESAS, "Hit end of envelope");
voice.playing = false;
voice.on = false;
}
}
}