Fix XEBA and Voice::is_end code
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user