unsigned int -> unsigned and trimmed whitespace.

This commit is contained in:
Francois Best 2013-07-07 15:11:58 +02:00
parent 601ddb3773
commit c4d5d76f4a
3 changed files with 268 additions and 268 deletions

View File

@ -68,7 +68,7 @@ public:
inline void sendAfterTouch(DataByte inPressure,
Channel inChannel);
inline void sendSysEx(unsigned int inLength,
inline void sendSysEx(unsigned inLength,
const byte* inArray,
bool inArrayContainsBoundaries = false);
@ -76,7 +76,7 @@ public:
DataByte inValuesNibble);
inline void sendTimeCodeQuarterFrame(DataByte inData);
inline void sendSongPosition(unsigned int inBeats);
inline void sendSongPosition(unsigned inBeats);
inline void sendSongSelect(DataByte inSongNumber);
inline void sendTuneRequest();
inline void sendRealTime(MidiType inType);
@ -109,7 +109,7 @@ public:
inline DataByte getData1() const;
inline DataByte getData2() const;
inline const byte* getSysExArray() const;
inline unsigned int getSysExArrayLength() const;
inline unsigned getSysExArrayLength() const;
inline bool check() const;
public:
@ -130,8 +130,8 @@ private:
Channel mInputChannel;
byte mPendingMessage[3]; // SysEx are dumped into mMessage directly.
unsigned int mPendingMessageExpectedLenght;
unsigned int mPendingMessageIndex; // Extended to unsigned int for larger SysEx payloads.
unsigned mPendingMessageExpectedLenght;
unsigned mPendingMessageIndex; // Extended to unsigned for larger SysEx payloads.
Message mMessage;
@ -150,7 +150,7 @@ public:
inline void setHandlePitchBend(void (*fptr)(byte channel, int bend));
inline void setHandleSystemExclusive(void (*fptr)(byte * array, byte size));
inline void setHandleTimeCodeQuarterFrame(void (*fptr)(byte data));
inline void setHandleSongPosition(void (*fptr)(unsigned int beats));
inline void setHandleSongPosition(void (*fptr)(unsigned beats));
inline void setHandleSongSelect(void (*fptr)(byte songnumber));
inline void setHandleTuneRequest(void (*fptr)(void));
inline void setHandleClock(void (*fptr)(void));
@ -175,7 +175,7 @@ private:
void (*mPitchBendCallback)(byte channel, int);
void (*mSystemExclusiveCallback)(byte * array, byte size);
void (*mTimeCodeQuarterFrameCallback)(byte data);
void (*mSongPositionCallback)(unsigned int beats);
void (*mSongPositionCallback)(unsigned beats);
void (*mSongSelectCallback)(byte songnumber);
void (*mTuneRequestCallback)(void);
void (*mClockCallback)(void);

View File

@ -268,7 +268,7 @@ template<class SerialPort>
void MidiInterface<SerialPort>::sendPitchBend(int inPitchValue,
Channel inChannel)
{
const unsigned int bend = inPitchValue - MIDI_PITCHBEND_MIN;
const unsigned bend = inPitchValue - MIDI_PITCHBEND_MIN;
send(PitchBend, (bend & 0x7F), (bend >> 7) & 0x7F, inChannel);
}
@ -297,7 +297,7 @@ void MidiInterface<SerialPort>::sendPitchBend(double inPitchValue,
with previous versions of the library.
*/
template<class SerialPort>
void MidiInterface<SerialPort>::sendSysEx(unsigned int inLength,
void MidiInterface<SerialPort>::sendSysEx(unsigned inLength,
const byte* inArray,
bool inArrayContainsBoundaries)
{
@ -305,14 +305,14 @@ void MidiInterface<SerialPort>::sendSysEx(unsigned int inLength,
{
mSerial.write(0xF0);
for (unsigned int i = 0; i < inLength; ++i)
for (unsigned i = 0; i < inLength; ++i)
mSerial.write(inArray[i]);
mSerial.write(0xF7);
}
else
{
for (unsigned int i = 0; i < inLength; ++i)
for (unsigned i = 0; i < inLength; ++i)
mSerial.write(inArray[i]);
}
@ -367,7 +367,7 @@ void MidiInterface<SerialPort>::sendTimeCodeQuarterFrame(DataByte inData)
\param inBeats The number of beats since the start of the song.
*/
template<class SerialPort>
void MidiInterface<SerialPort>::sendSongPosition(unsigned int inBeats)
void MidiInterface<SerialPort>::sendSongPosition(unsigned inBeats)
{
mSerial.write((byte)SongPosition);
mSerial.write(inBeats & 0x7F);
@ -865,9 +865,9 @@ const byte* MidiInterface<SerialPort>::getSysExArray() const
\return The array's length, in bytes.
*/
template<class SerialPort>
unsigned int MidiInterface<SerialPort>::getSysExArrayLength() const
unsigned MidiInterface<SerialPort>::getSysExArrayLength() const
{
const unsigned int size = ((unsigned)(mMessage.data2) << 8) | mMessage.data1;
const unsigned size = ((unsigned)(mMessage.data2) << 8) | mMessage.data1;
return (size > MIDI_SYSEX_ARRAY_SIZE) ? MIDI_SYSEX_ARRAY_SIZE : size;
}
@ -944,7 +944,7 @@ template<class SerialPort> void MidiInterface<SerialPort>::setHandleAfterTouchCh
template<class SerialPort> void MidiInterface<SerialPort>::setHandlePitchBend(void (*fptr)(byte channel, int bend)) { mPitchBendCallback = fptr; }
template<class SerialPort> void MidiInterface<SerialPort>::setHandleSystemExclusive(void (*fptr)(byte* array, byte size)) { mSystemExclusiveCallback = fptr; }
template<class SerialPort> void MidiInterface<SerialPort>::setHandleTimeCodeQuarterFrame(void (*fptr)(byte data)) { mTimeCodeQuarterFrameCallback = fptr; }
template<class SerialPort> void MidiInterface<SerialPort>::setHandleSongPosition(void (*fptr)(unsigned int beats)) { mSongPositionCallback = fptr; }
template<class SerialPort> void MidiInterface<SerialPort>::setHandleSongPosition(void (*fptr)(unsigned beats)) { mSongPositionCallback = fptr; }
template<class SerialPort> void MidiInterface<SerialPort>::setHandleSongSelect(void (*fptr)(byte songnumber)) { mSongSelectCallback = fptr; }
template<class SerialPort> void MidiInterface<SerialPort>::setHandleTuneRequest(void (*fptr)(void)) { mTuneRequestCallback = fptr; }
template<class SerialPort> void MidiInterface<SerialPort>::setHandleClock(void (*fptr)(void)) { mClockCallback = fptr; }