ADL & OPN MIDI: Fixed some MSVC warnings

This commit is contained in:
Wohlstand 2020-09-28 23:40:23 +03:00 committed by drfrag
parent 0458a02d9f
commit b00f8c5431
4 changed files with 5 additions and 5 deletions

View file

@ -1714,7 +1714,7 @@ size_t MIDIplay::chooseDevice(const std::string &name)
size_t n = m_midiDevices.size() * 16; size_t n = m_midiDevices.size() * 16;
m_midiDevices.insert(std::make_pair(name, n)); m_midiDevices.insert(std::make_pair(name, n));
m_midiChannels.resize(n + 16); m_midiChannels.resize(n + 16);
resetMIDIDefaults(n); resetMIDIDefaults(static_cast<int>(n));
return n; return n;
} }

View file

@ -394,7 +394,7 @@ static inline double s_dmxFreq(double tone)
{ {
uint_fast32_t noteI = (uint_fast32_t)(tone); uint_fast32_t noteI = (uint_fast32_t)(tone);
int_fast32_t bendI = 0; int_fast32_t bendI = 0;
int_fast32_t outHz = 0.0; int_fast32_t outHz = 0;
double bendDec = tone - (int)tone; double bendDec = tone - (int)tone;
bendI = (int_fast32_t)((bendDec * 128.0) / 2.0) + 128; bendI = (int_fast32_t)((bendDec * 128.0) / 2.0) + 128;
@ -470,7 +470,7 @@ static inline double s_apogeeFreq(double tone)
{ {
uint_fast32_t noteI = (uint_fast32_t)(tone); uint_fast32_t noteI = (uint_fast32_t)(tone);
int_fast32_t bendI = 0; int_fast32_t bendI = 0;
int_fast32_t outHz = 0.0; int_fast32_t outHz = 0;
double bendDec = tone - (int)tone; double bendDec = tone - (int)tone;
int_fast32_t octave; int_fast32_t octave;
int_fast32_t scaleNote; int_fast32_t scaleNote;

View file

@ -1606,7 +1606,7 @@ size_t OPNMIDIplay::chooseDevice(const std::string &name)
size_t n = m_midiDevices.size() * 16; size_t n = m_midiDevices.size() * 16;
m_midiDevices.insert(std::make_pair(name, n)); m_midiDevices.insert(std::make_pair(name, n));
m_midiChannels.resize(n + 16); m_midiChannels.resize(n + 16);
resetMIDIDefaults(n); resetMIDIDefaults(static_cast<int>(n));
return n; return n;
} }

View file

@ -400,7 +400,7 @@ void OPN2::touchNote(size_t c,
if(volume > minVolume) if(volume > minVolume)
{ {
double lv = std::log(static_cast<double>(volume)); double lv = std::log(static_cast<double>(volume));
volume = static_cast<uint_fast32_t>(lv * c1 - c2) * 2.0; volume = static_cast<uint_fast32_t>(lv * c1 - c2) * 2;
} }
else else
volume = 0; volume = 0;