Fix XEBA and Voice::is_end code

This commit is contained in:
Jaby
2024-09-26 21:40:15 +02:00
parent 018058d79b
commit 01b2ec4083
3 changed files with 12 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ namespace JabyEngine {
voice.sampleRate.write(SampleRate::stop());
voice.ad.write(AD::none());
voice.sr.write(SR::none());
voice.currentVolume.write(SimpleVolume::mute());
voice.adsr_volume.write(SimpleVolume::mute());
voice.adr.write(SRAMAdr::adpcm_start());
voice.repeatAdr.write(SRAMAdr::adpcm_start());
@@ -58,11 +58,11 @@ namespace JabyEngine {
}
static void wait_voices() {
static constexpr SimpleVolume Treshhold{static_cast<int16_t>(I16_MAX*0.03)};
static constexpr auto Treshhold = SimpleVolume::mute();
try_again:
for(const auto& voice : SPU_IO::Voice) {
if(voice.currentVolume.read() > Treshhold) {
if(voice.adsr_volume.read() > Treshhold) {
goto try_again;
}
}