Fix warning in code for showing MIDI duration
This commit is contained in:
parent
8c86ca05c0
commit
2e860f6370
|
@ -659,7 +659,7 @@ void CDraw::drawSymbol(CSymbol symbol, float x, float y, CSlot* slot)
|
|||
drColor(CColor(0.3, 0.4, 0.4));
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex2f(x, y);
|
||||
glVertex2f(x + CMidiFile::ppqnAdjust(symbol.getMidiDuration()) * HORIZONTAL_SPACING_FACTOR, y);
|
||||
glVertex2f(x + CMidiFile::ppqnAdjust<float>(static_cast<float>(symbol.getMidiDuration())) * HORIZONTAL_SPACING_FACTOR, y);
|
||||
glEnd();
|
||||
drColor(color);
|
||||
*/
|
||||
|
|
|
@ -57,8 +57,9 @@ public:
|
|||
int readHeader(void);
|
||||
void rewind();
|
||||
static int getPulsesPerQuarterNote(){return m_ppqn;}
|
||||
static int ppqnAdjust(float value) {
|
||||
return static_cast<int>((value * static_cast<float>(CMidiFile::getPulsesPerQuarterNote()))/DEFAULT_PPQN );
|
||||
template<typename T = int>
|
||||
static T ppqnAdjust(float value) {
|
||||
return static_cast<T>((value * static_cast<float>(CMidiFile::getPulsesPerQuarterNote()))/DEFAULT_PPQN );
|
||||
}
|
||||
QString getSongTitle() {return m_songTitle;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue