Skip to content

Commit

Permalink
- fixed signedness issues in OPL code.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Apr 23, 2017
1 parent 9308e45 commit f9735c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/sound/mididevices/music_opl_mididevice.cpp
Expand Up @@ -296,7 +296,7 @@ FString OPLMIDIDevice::GetStats()
char star[3] = { TEXTCOLOR_ESCAPE, 'A', '*' };
for (uint32_t i = 0; i < io->NumChannels; ++i)
{
if (voices[i].index == -1)
if (voices[i].index == ~0u)
{
star[1] = CR_BRICK + 'A';
}
Expand Down
4 changes: 2 additions & 2 deletions src/sound/oplsynth/musicblock.cpp
Expand Up @@ -140,7 +140,7 @@ void musicBlock::voiceKeyOn(uint32_t slot, uint32_t channo, GenMidiInstrument *i

// Work out the note to use. This is normally the same as
// the key, unless it is a fixed pitch instrument.
uint32_t note;
int note;
if (instrument->flags & GENMIDI_FLAG_FIXED) note = instrument->fixed_note;
else if (channo == CHAN_PERCUSSION) note = 60;
else note = key;
Expand Down Expand Up @@ -475,6 +475,6 @@ void musicBlock::stopAllVoices()
{
for (uint32_t i = 0; i < io->NumChannels; i++)
{
if (voices[i].index >= 0) releaseVoice(i, 1);
if (voices[i].index != ~0u) releaseVoice(i, 1);
}
}

0 comments on commit f9735c4

Please sign in to comment.