Skip to content

Commit

Permalink
Fixed some of MSVC warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlstand committed Oct 1, 2018
1 parent ae41f31 commit f113f19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/opnmidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ OPNMIDI_EXPORT void opn2_setLfoEnabled(struct OPN2_MIDIPlayer *device, int lfoEn
MidiPlayer *play = GET_MIDI_PLAYER(device);
assert(play);
play->m_setup.lfoEnable = lfoEnable;
play->m_synth.m_lfoEnable = lfoEnable < 0 ?
play->m_synth.m_lfoEnable = (lfoEnable < 0 ?
play->m_synth.m_insBankSetup.lfoEnable :
(play->m_setup.lfoEnable != 0);
play->m_setup.lfoEnable) != 0;
play->m_synth.commitLFOSetup();
}

Expand Down
4 changes: 2 additions & 2 deletions src/opnmidi_midiplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ void OPNMIDIplay::applySetup()
m_synth.m_numChips = m_setup.numChips;

if(m_setup.lfoEnable < 0)
m_synth.m_lfoEnable = m_synth.m_insBankSetup.lfoEnable;
m_synth.m_lfoEnable = (m_synth.m_insBankSetup.lfoEnable != 0);
else
m_synth.m_lfoEnable = m_setup.lfoEnable;
m_synth.m_lfoEnable = (m_setup.lfoEnable != 0);

if(m_setup.lfoFrequency < 0)
m_synth.m_lfoFrequency = m_synth.m_insBankSetup.lfoFrequency;
Expand Down
2 changes: 1 addition & 1 deletion src/opnmidi_opn2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void OPN2::noteOn(size_t c, double hertz) // Hertz range: 0..131071
for(size_t op = 0; op < 4; op++)
{
uint32_t reg = adli.OPS[op].data[0];
uint16_t address = 0x30 + (op * 4) + cc;
uint16_t address = static_cast<uint16_t>(0x30 + (op * 4) + cc);
if(mul_offset > 0) // Increase frequency multiplication value
{
uint32_t dt = reg & 0xF0;
Expand Down

0 comments on commit f113f19

Please sign in to comment.