From 3fa2913771a4506a65ddf8cb03ef5ac08bc34af1 Mon Sep 17 00:00:00 2001 From: TonyChyi Date: Sat, 14 Jan 2017 14:59:17 +0800 Subject: [PATCH] Fix link bug, reorder warning, and vol value while importing. --- plugins/SmfImport/CMakeLists.txt | 2 +- plugins/SmfImport/commonReader.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/SmfImport/CMakeLists.txt b/plugins/SmfImport/CMakeLists.txt index a0394fa7001..8763f784eb8 100644 --- a/plugins/SmfImport/CMakeLists.txt +++ b/plugins/SmfImport/CMakeLists.txt @@ -11,7 +11,7 @@ INCLUDE(BuildPlugin) LINK_DIRECTORIES(${DRUMSTICK_FILE_LIBDIR}) INCLUDE_DIRECTORIES(${DRUMSTICK_FILE_INCLUDEDIR}) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -ldrumstick-file -Wno-reorder") BUILD_PLUGIN(smfimport SmfImport.cpp commonReader.cpp midiReader.cpp oveReader.cpp wrkReader.cpp MOCFILES SmfImport.h commonReader.h midiReader.h oveReader.h wrkReader.h ) diff --git a/plugins/SmfImport/commonReader.cpp b/plugins/SmfImport/commonReader.cpp index 8e6018b2540..a9adb3f94ef 100644 --- a/plugins/SmfImport/commonReader.cpp +++ b/plugins/SmfImport/commonReader.cpp @@ -387,7 +387,7 @@ void commonReader::addNoteEvent( long tick, int chan, int pitch, int vol, QString trackName = TrackContainer::tr( "Track %1" ).arg( track + 1 ); SmfMidiChannel * ch = chs[track].create( m_tc, trackName ); double realDur = dur * tickRate; - Note n( ( realDur < 1 ? 1 : realDur ), static_cast( tick ) * tickRate, pitch - 12, vol ); + Note n( ( realDur < 1 ? 1 : realDur ), static_cast( tick ) * tickRate, pitch - 12, vol * 200 / 127 ); ch->addNote( n ); }