OPL4 activation timestamp now comes from platform timestamp

This commit is contained in:
Cacodemon345
2022-11-27 21:35:08 +06:00
parent 4445f1f108
commit 767d486aee

View File

@@ -420,7 +420,6 @@ note_on(uint8_t note, uint8_t velocity, MIDI_CHANNEL_DATA *midi_channel, opl4_mi
VOICE_DATA *voice[2]; VOICE_DATA *voice[2];
uint8_t i = 0, voices = 0; uint8_t i = 0, voices = 0;
uint32_t j = 0; uint32_t j = 0;
static uint64_t activation_num = 0;
while (opl4_midi->gen_in_progress) { } while (opl4_midi->gen_in_progress) { }
@@ -444,7 +443,7 @@ note_on(uint8_t note, uint8_t velocity, MIDI_CHANNEL_DATA *midi_channel, opl4_mi
for (i = 0; i < voices; i++) { for (i = 0; i < voices; i++) {
voice[i] = get_voice(wave_data[i], opl4_midi); voice[i] = get_voice(wave_data[i], opl4_midi);
voice[i]->is_active = true; voice[i]->is_active = true;
voice[i]->activated = activation_num++; voice[i]->activated = plat_get_ticks();
voice[i]->midi_channel = midi_channel; voice[i]->midi_channel = midi_channel;
voice[i]->note = note; voice[i]->note = note;