Unverified Commit 770c8c6d authored by Libretro-Admin's avatar Libretro-Admin Committed by GitHub
Browse files

Merge branch 'main' into new-targets

parents b3f813b1 279d33e0
Pipeline #18000 passed with stage
in 3 minutes and 20 seconds
......@@ -76,12 +76,24 @@ include:
file: '/tvos-arm64.yml'
#################################### MISC ##################################
#
# # Nintendo WiiU
# - project: 'libretro-infrastructure/ci-templates'
# file: '/wiiu-static.yml'
#
# # Nintendo Switch
# - project: 'libretro-infrastructure/ci-templates'
# file: '/libnx-static.yml'
#
# # PlayStation Vita
# - project: 'libretro-infrastructure/ci-templates'
# file: '/vita-static.yml'
# Stages for building
stages:
- build-prepare
- build-shared
- build-static
# - build-static
##############################################################################
#################################### STAGES ##################################
......@@ -175,13 +187,14 @@ libretro-build-tvos-arm64:
- .libretro-tvos-arm64-make-default
- .core-defs
################################### CONSOLES #################################
#################################### CONSOLES #################################
## Nintendo 3DS
#libretro-build-ctr:
# extends:
# - .libretro-ctr-static-retroarch-master
# - .core-defs
#
## Nintendo WiiU
#libretro-build-wiiu:
# extends:
......@@ -189,10 +202,10 @@ libretro-build-tvos-arm64:
# - .core-defs
# Nintendo Switch
libretro-build-libnx-aarch64:
extends:
- .libretro-libnx-static-retroarch-master
- .core-defs
#libretro-build-libnx-aarch64:
#extends:
#- .libretro-libnx-static-retroarch-master
#- .core-defs
## PlayStation Vita
#libretro-build-vita:
......@@ -204,4 +217,4 @@ libretro-build-libnx-aarch64:
libretro-build-dingux-mips32:
extends:
- .libretro-dingux-mips32-make-default
- .core-defs
- .core-defs
\ No newline at end of file
......@@ -80,13 +80,16 @@ struct MidiHandler_tsf : public MidiHandler
if (!sf && (!f || !LoadFont())) return;
Bit8u channel = (msg[0] & 0x0f);
// if (channel == 2 || channel == 3 || channel == 4)
switch (msg[0] & 0xf0)
{
case 0xC0: //channel program (preset) change (special handling for 10th MIDI channel with drums)
// printf("[MIDI] Channel %2d PRESET %3d\n", channel, msg[1]);
tsf_channel_set_presetnumber(sf, channel, msg[1], (channel == 9));
break;
case 0x90: //play a note
tsf_channel_note_on(sf, channel, msg[1], msg[2] / 127.0f);
// printf("[MIDI] Channel %2d NOTE %3d AT VEL %3d\n", channel, msg[1], msg[2]);
tsf_channel_note_on(sf, channel, msg[1], msg[2] / 127.0f); //1);//TSF_POWF(msg[2] / 127.0f, .5f));
break;
case 0x80: //stop a note
tsf_channel_note_off(sf, channel, msg[1]);
......@@ -95,6 +98,7 @@ struct MidiHandler_tsf : public MidiHandler
tsf_channel_set_pitchwheel(sf, channel, ((msg[2] & 0x7f) << 7) | msg[1]);
break;
case 0xB0: //MIDI controller messages
// printf("[MIDI] Channel %2d CONTROLLER %3d - %3d\n", channel, msg[1], msg[2]);
tsf_channel_midi_control(sf, channel, msg[1], msg[2]);
break;
}
......@@ -108,9 +112,9 @@ struct MidiHandler_tsf : public MidiHandler
// F0 43 10 4C 00 00 7E 00 F7 //XG RESET
// F0 7E 7F 09 01 F7 //GM RESET
// 00 00 00 00 00 00 // DOOM reset?
//fprintf(stderr, "[SYSEX]");
//for (Bitu i = 0; i != len; i++) fprintf(stderr, " %02X", sysex[len]);
//fprintf(stderr, "\n");
// fprintf(stderr, "[SYSEX]");
// for (Bitu i = 0; i != len; i++) fprintf(stderr, " %02X", sysex[len]);
// fprintf(stderr, "\n");
}
};
......
......@@ -813,7 +813,11 @@ static void tsf_load_presets(tsf* res, struct tsf_hydra *hydra, unsigned int fon
}
// Modulators (TODO)
//if (pbag->modNdx < pbag[1].modNdx) addUnsupportedOpcode("any modulator");
//if (ppbag->modNdx < ppbag[1].modNdx) addUnsupportedOpcode("any modulator");
// if (ppbag->modNdx < ppbag[1].modNdx)
// {
// printf("UNSUPPORTED MODULATOR\n");
// }
// Handle preset's global zone.
if (ppbag == hydra->pbags + pphdr->presetBagNdx && !hadGenInstrument)
......@@ -1736,7 +1740,8 @@ TSFDEF void tsf_channel_midi_control(tsf* f, int channel, int controller, int co
}
return;
TCMC_SET_VOLUME:
//Raising to the power of 3 seems to result in a decent sounding volume curve for MIDI
// printf("[MIDI] Channel %2d to %5d - %5d\n", channel, c->midiVolume, c->midiExpression);
// tsf_channel_set_volume(f, channel, TSF_POWF((c->midiVolume / 16383.0f) * (c->midiExpression / 16383.0f), 2.0f));
tsf_channel_set_volume(f, channel, TSF_POWF((c->midiVolume / 16383.0f) * (c->midiExpression / 16383.0f), 3.0f));
return;
TCMC_SET_PAN:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment