events.add(NecMessage.getStreamOnEvent(R, streamNumber++, velocity));
}
// nop2
for (int j = 0; j < blockDelta / Nop2Message.maxDelta; j++) {
Nop2Message nop2 = new Nop2Message(0xff, 0xff);
events.add(new MfiEvent(nop2, 0l));
}
int moduloOfBlockDelta = blockDelta % Nop2Message.maxDelta;
Nop2Message nop2 = new Nop2Message(moduloOfBlockDelta % 0x100, moduloOfBlockDelta / 0x100);
events.add(new MfiEvent(nop2, 0l));
}
if (moduloOfChunks != 0) {
if (channels == 1) {
// adpcm on
events.add(getStreamOn(streamNumber++, velocity));
} else {
// adpcm on L
events.add(NecMessage.getStreamOnEvent(L, streamNumber++, velocity));
// adpcm on R
events.add(NecMessage.getStreamOnEvent(R, streamNumber++, velocity));
}
// nop2
int moduloOfDelta = delta % blockDelta;
for (int j = 0; j < moduloOfDelta / Nop2Message.maxDelta; j++) {
Nop2Message nop2 = new Nop2Message(0xff, 0xff);
events.add(new MfiEvent(nop2, 0l));
}
int moduloOfBlockDelta = moduloOfDelta % Nop2Message.maxDelta;
Nop2Message nop2 = new Nop2Message(moduloOfBlockDelta % 0x100, moduloOfBlockDelta / 0x100);
events.add(new MfiEvent(nop2, 0l));
}
return events;
}