From 22d2506f5308094e706ec152ec64cfc92ef12876 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Mon, 24 Aug 2020 02:27:44 +0300 Subject: More clean-up of old commented code --- src/adldata.hh | 23 ----------------------- src/adlmidi_midiplay.cpp | 2 +- src/adlmidi_opl3.cpp | 14 -------------- 3 files changed, 1 insertion(+), 38 deletions(-) (limited to 'src') diff --git a/src/adldata.hh b/src/adldata.hh index deea8f4..44a55e6 100644 --- a/src/adldata.hh +++ b/src/adldata.hh @@ -93,29 +93,6 @@ struct AdlBankSetup bool scaleModulators; }; - -///** -// * @brief Conversion of storage formats -// */ -//inline adlinsdata2 adlinsdata2::from_adldata(const adlinsdata &d) -//{ -// adlinsdata2 ins; -// ins.tone = d.tone; -// ins.flags = d.flags; -// ins.ms_sound_kon = d.ms_sound_kon; -// ins.ms_sound_koff = d.ms_sound_koff; -// ins.midi_velocity_offset = d.midi_velocity_offset; -// ins.voice2_fine_tune = d.voice2_fine_tune; -//#ifdef DISABLE_EMBEDDED_BANKS -// std::memset(ins.adl, 0, sizeof(adldata) * 2); -//#else -// std::memset(ins.adl, 0, sizeof(adldata) * 2); -//// ins.adl[0] = ::adl[d.adlno1]; -//// ins.adl[1] = ::adl[d.adlno2]; -//#endif -// return ins; -//} - /** * @brief Convert external instrument to internal instrument */ diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 96eca34..2ed7815 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -431,7 +431,7 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity) {0, ains->adl[0], false}, {0, (!is_2op) ? ains->adl[1] : ains->adl[0], pseudo_4op} }; -#else /* Unfortunately, WatCom can't brace-initialize structure that incluses structure fields */ +#else /* Unfortunately, Watcom can't brace-initialize structure that incluses structure fields */ MIDIchannel::NoteInfo::Phys voices[MIDIchannel::NoteInfo::MaxNumPhysChans]; voices[0].chip_chan = 0; voices[0].ains = ains->adl[0]; diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index 1309d83..3648956 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -670,20 +670,6 @@ void OPL3::touchNote(size_t c, // 63 + chanvol * (instrvol / 63.0 - 1) } -/* -void OPL3::Touch(unsigned c, unsigned volume) // Volume maxes at 127*127*127 -{ - if(LogarithmicVolumes) - Touch_Real(c, volume * 127 / (127 * 127 * 127) / 2); - else - { - // The formula below: SOLVE(V=127^3 * 2^( (A-63.49999) / 8), A) - Touch_Real(c, volume > 8725 ? static_cast(std::log(volume) * 11.541561 + (0.5 - 104.22845)) : 0); - // The incorrect formula below: SOLVE(V=127^3 * (2^(A/63)-1), A) - //Touch_Real(c, volume>11210 ? 91.61112 * std::log(4.8819E-7*volume + 1.0)+0.5 : 0); - } -}*/ - void OPL3::setPatch(size_t c, const adldata &instrument) { size_t chip = c / NUM_OF_CHANNELS, cc = c % NUM_OF_CHANNELS; -- cgit v1.2.3