@@ -292,7 +292,7 @@ template<class SerialPort, class Settings>
292292void MidiInterface<SerialPort, Settings>::sendPitchBend(int inPitchValue,
293293 Channel inChannel)
294294{
295- const unsigned bend = inPitchValue - MIDI_PITCHBEND_MIN;
295+ const unsigned bend = unsigned ( inPitchValue - int ( MIDI_PITCHBEND_MIN)) ;
296296 send (PitchBend, (bend & 0x7f ), (bend >> 7 ) & 0x7f , inChannel);
297297}
298298
@@ -375,7 +375,7 @@ template<class SerialPort, class Settings>
375375void MidiInterface<SerialPort, Settings>::sendTimeCodeQuarterFrame(DataByte inTypeNibble,
376376 DataByte inValuesNibble)
377377{
378- const byte data = (((inTypeNibble & 0x07 ) << 4 ) | (inValuesNibble & 0x0f ));
378+ const byte data = byte (((( inTypeNibble & 0x07 ) << 4 ) | (inValuesNibble & 0x0f ) ));
379379 sendTimeCodeQuarterFrame (data);
380380}
381381
@@ -620,7 +620,7 @@ template<class SerialPort, class Settings>
620620StatusByte MidiInterface<SerialPort, Settings>::getStatus(MidiType inType,
621621 Channel inChannel) const
622622{
623- return (( byte)inType | ((inChannel - 1 ) & 0x0f ));
623+ return StatusByte ((( byte)inType | ((inChannel - 1 ) & 0x0f ) ));
624624}
625625
626626// -----------------------------------------------------------------------------
@@ -856,7 +856,7 @@ bool MidiInterface<SerialPort, Settings>::parse()
856856
857857 // Get length
858858 mMessage .data1 = mPendingMessageIndex & 0xff ; // LSB
859- mMessage .data2 = mPendingMessageIndex >> 8 ; // MSB
859+ mMessage .data2 = byte ( mPendingMessageIndex >> 8 ) ; // MSB
860860 mMessage .channel = 0 ;
861861 mMessage .valid = true ;
862862
@@ -1116,7 +1116,7 @@ MidiType MidiInterface<SerialPort, Settings>::getTypeFromStatusByte(byte inStatu
11161116template <class SerialPort , class Settings >
11171117inline Channel MidiInterface<SerialPort, Settings>::getChannelFromStatusByte(byte inStatus)
11181118{
1119- return ( inStatus & 0x0f ) + 1 ;
1119+ return Channel (( inStatus & 0x0f ) + 1 ) ;
11201120}
11211121
11221122template <class SerialPort , class Settings >
@@ -1221,7 +1221,7 @@ void MidiInterface<SerialPort, Settings>::launchCallback()
12211221
12221222 // Occasional messages
12231223 case TimeCodeQuarterFrame: if (mTimeCodeQuarterFrameCallback != 0 ) mTimeCodeQuarterFrameCallback (mMessage .data1 ); break ;
1224- case SongPosition: if (mSongPositionCallback != 0 ) mSongPositionCallback (( mMessage .data1 & 0x7f ) | ((mMessage .data2 & 0x7f ) << 7 )); break ;
1224+ case SongPosition: if (mSongPositionCallback != 0 ) mSongPositionCallback (unsigned (( mMessage .data1 & 0x7f ) | ((mMessage .data2 & 0x7f ) << 7 ) )); break ;
12251225 case SongSelect: if (mSongSelectCallback != 0 ) mSongSelectCallback (mMessage .data1 ); break ;
12261226 case TuneRequest: if (mTuneRequestCallback != 0 ) mTuneRequestCallback (); break ;
12271227
0 commit comments