@@ 171,7 171,7 @@ deo_audio(u8 *dev, u8 port) {
size_t idx = (dev - (device_data + 0x30)) / 16;
if (port == 0xf) {
u16 duration = PEEK2(dev + 0x2);
- u8 off = (u8)dev[0xf] >> 7;
+ u8 off = dev[0xf] == 0xff;
if (!off) {
// Sample.
@@ 179,7 179,7 @@ deo_audio(u8 *dev, u8 port) {
u8 *data = &uxn_ram[addr];
u16 len = PEEK2(dev + 0x8);
u8 volume = dev[0xd];
- bool loop = !(dev[0xf] & 0x80);
+ bool loop = !!(dev[0xf] & 0x80);
// Pitch.
u8 pitch = dev[0xf] & 0x7f;
@@ 189,7 189,6 @@ deo_audio(u8 *dev, u8 port) {
u8 decay = dev[0x5];
u8 sustain = dev[0x6];
u8 release = dev[0x7];
- // println("IDX: %d PITCH: %d", idx, pitch);
note_on(&audio_ctx.channel[idx], duration, data, len, volume, attack, decay, sustain, release, pitch, loop);
} else {