diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-08-31 03:55:14 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-08-31 03:55:14 +0300 |
commit | d8b894af640bd1e2b1115bd69c29b4654b3c6973 (patch) | |
tree | 6d5d28788bd719e6439976cd4716673bc74bc654 /src | |
parent | c7b3199669a7b7e0ba11eb0d94d4e143a5fdd633 (diff) | |
parent | cf121066a365286bd1427f54064b487799623ec9 (diff) | |
download | libADLMIDI-d8b894af640bd1e2b1115bd69c29b4654b3c6973.tar.gz libADLMIDI-d8b894af640bd1e2b1115bd69c29b4654b3c6973.tar.bz2 libADLMIDI-d8b894af640bd1e2b1115bd69c29b4654b3c6973.zip |
Merge branch 'master' of git@github.com:Wohlstand/libADLMIDI.git
# Conflicts:
# src/adlmidi_opl3.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/adldata.cpp | 8 | ||||
-rw-r--r-- | src/adlmidi.cpp | 6 | ||||
-rw-r--r-- | src/adlmidi_midiplay.cpp | 2 | ||||
-rw-r--r-- | src/adlmidi_opl3.cpp | 2 | ||||
-rw-r--r-- | src/cvt_xmi2mid.hpp | 2 | ||||
-rw-r--r-- | src/midi_sequencer_impl.hpp | 13 |
6 files changed, 25 insertions, 8 deletions
diff --git a/src/adldata.cpp b/src/adldata.cpp index 6606e1f..b7fd3a1 100644 --- a/src/adldata.cpp +++ b/src/adldata.cpp @@ -9449,8 +9449,8 @@ const char* const banknames[76] = "TMB (Shadow Warrior)", "DMX (Raptor)", "OP3 (Modded GMOPL by Wohlstand)", - "SB (Jammey O'Connel's bank)", - "TMB (Default bank of Apgee Sound System)", + "SB (Jamie O'Connell's bank)", + "TMB (Default bank of Apogee Sound System)", "WOPL (4op bank by James Alan Nguyen and Wohlstand)", "TMB (Blood)", "TMB (Lee)", @@ -10882,8 +10882,8 @@ const AdlBankSetup adlbanksetup[75] = {3, 0, 0, 0, 0}, //Bank 63, TMB (Shadow Warrior) {2, 0, 0, 0, 0}, //Bank 64, DMX (Raptor) {3, 0, 0, 0, 0}, //Bank 65, OP3 (Modded GMOPL by Wohlstand) - {3, 0, 0, 0, 0}, //Bank 66, SB (Jammey O'Connel's bank) - {3, 0, 0, 0, 0}, //Bank 67, TMB (Default bank of Apgee Sound System) + {3, 0, 0, 0, 0}, //Bank 66, SB (Jamie O'Connell's bank) + {3, 0, 0, 0, 0}, //Bank 67, TMB (Default bank of Apogee Sound System) {0, 1, 1, 0, 0}, //Bank 68, WOPL (4op bank by James Alan Nguyen and Wohlstand) {3, 0, 0, 0, 0}, //Bank 69, TMB (Blood) {3, 0, 0, 0, 0}, //Bank 70, TMB (Lee) diff --git a/src/adlmidi.cpp b/src/adlmidi.cpp index c7c5cf3..26a21e4 100644 --- a/src/adlmidi.cpp +++ b/src/adlmidi.cpp @@ -351,6 +351,10 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4) { if(!device) return -1; + + if(ops4 == -1) + return adlRefreshNumCards(device); + MidiPlayer *play = GET_MIDI_PLAYER(device); if((unsigned int)ops4 > 6 * play->m_setup.numChips) { @@ -364,7 +368,7 @@ ADLMIDI_EXPORT int adl_setNumFourOpsChn(ADL_MIDIPlayer *device, int ops4) play->m_synth.m_numFourOps = play->m_setup.numFourOps; play->m_synth.updateChannelCategories(); - return 0; //adlRefreshNumCards(device); + return 0; } ADLMIDI_EXPORT int adl_getNumFourOpsChn(struct ADL_MIDIPlayer *device) diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index cdd4086..9a76236 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1600,7 +1600,7 @@ void MIDIplay::setRPN(size_t midCh, unsigned value, bool MSB) case 0x0109 + 1*0x10000 + 1*0x20000: if((m_synthMode & Mode_XG) != 0) // Vibrato depth { - m_midiChannels[midCh].vibdepth = ((value - 64) * 0.15) * 0.01; + m_midiChannels[midCh].vibdepth = (((int)value - 64) * 0.15) * 0.01; } break; case 0x010A + 1*0x10000 + 1*0x20000: diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index 7ec1fd6..60c173e 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -528,7 +528,7 @@ void OPL3::updateChannelCategories() for(size_t b = 0; b < 23; ++b) { m_channelCategory[a * 23 + b] = - (b >= 18) ? static_cast<int>(ChanCat_Rhythm_Bass + (b - 18)) : + (b >= 18) ? static_cast<ChanCat>(ChanCat_Rhythm_Bass + (b - 18)) : (b >= 6 && b < 9) ? ChanCat_Rhythm_Slave : ChanCat_Regular; } } diff --git a/src/cvt_xmi2mid.hpp b/src/cvt_xmi2mid.hpp index decb25c..e8d9dbf 100644 --- a/src/cvt_xmi2mid.hpp +++ b/src/cvt_xmi2mid.hpp @@ -640,7 +640,7 @@ static int xmi2mid_GetVLQ2(struct xmi2mid_xmi_ctx *ctx, uint32_t *quant) { int32_t data; *quant = 0; - for (i = 0; i < 4; i++) { + for (i = 0; xmi2mid_getsrcpos(ctx) != xmi2mid_getsrcsize(ctx); ++i) { data = xmi2mid_read1(ctx); if (data & 0x80) { xmi2mid_skipsrc(ctx, -1); diff --git a/src/midi_sequencer_impl.hpp b/src/midi_sequencer_impl.hpp index 0fe6192..e54c7ee 100644 --- a/src/midi_sequencer_impl.hpp +++ b/src/midi_sequencer_impl.hpp @@ -614,6 +614,19 @@ bool BW_MidiSequencer::buildSmfTrackData(const std::vector<std::vector<uint8_t> } } +#ifdef ENABLE_END_SILENCE_SKIPPING + //Have track end on its own row? Clear any delay on the row before + if(event.subtype == MidiEvent::ST_ENDTRACK && evtPos.events.size() == 1) + { + if (!m_trackData[tk].empty()) + { + MidiTrackRow &previous = m_trackData[tk].back(); + previous.delay = 0; + previous.timeDelay = 0; + } + } +#endif + if((evtPos.delay > 0) || (event.subtype == MidiEvent::ST_ENDTRACK)) { evtPos.absPos = abs_position; |