comparison data/fileio/MIDIFileReader.cpp @ 929:59e7fe1b1003 warnfix_no_size_t

Unsigned removals and warning fixes in data/
author Chris Cannam
date Tue, 17 Jun 2014 14:33:42 +0100
parents e802e550a1f2
children 12e62865fd61
comparison
equal deleted inserted replaced
928:6a94bb528e9d 929:59e7fe1b1003
55 //#define MIDI_SVDEBUG 1 55 //#define MIDI_SVDEBUG 1
56 56
57 57
58 MIDIFileReader::MIDIFileReader(QString path, 58 MIDIFileReader::MIDIFileReader(QString path,
59 MIDIFileImportPreferenceAcquirer *acquirer, 59 MIDIFileImportPreferenceAcquirer *acquirer,
60 size_t mainModelSampleRate) : 60 int mainModelSampleRate) :
61 m_smpte(false), 61 m_smpte(false),
62 m_timingDivision(0), 62 m_timingDivision(0),
63 m_fps(0), 63 m_fps(0),
64 m_subframes(0), 64 m_subframes(0),
65 m_format(MIDI_FILE_BAD_FORMAT), 65 m_format(MIDI_FILE_BAD_FORMAT),
894 } 894 }
895 } 895 }
896 896
897 if (tracksToLoad.empty()) return 0; 897 if (tracksToLoad.empty()) return 0;
898 898
899 size_t n = tracksToLoad.size(), count = 0; 899 int n = tracksToLoad.size(), count = 0;
900 Model *model = 0; 900 Model *model = 0;
901 901
902 for (std::set<unsigned int>::iterator i = tracksToLoad.begin(); 902 for (std::set<unsigned int>::iterator i = tracksToLoad.begin();
903 i != tracksToLoad.end(); ++i) { 903 i != tracksToLoad.end(); ++i) {
904 904
941 model->setValueQuantization(1.0); 941 model->setValueQuantization(1.0);
942 } 942 }
943 943
944 const MIDITrack &track = m_midiComposition.find(trackToLoad)->second; 944 const MIDITrack &track = m_midiComposition.find(trackToLoad)->second;
945 945
946 size_t totalEvents = track.size(); 946 int totalEvents = track.size();
947 size_t count = 0; 947 int count = 0;
948 948
949 bool minorKey = false;
950 bool sharpKey = true; 949 bool sharpKey = true;
951 950
952 for (MIDITrack::const_iterator i = track.begin(); i != track.end(); ++i) { 951 for (MIDITrack::const_iterator i = track.begin(); i != track.end(); ++i) {
953 952
954 RealTime rt; 953 RealTime rt;
966 if ((*i)->isMeta()) { 965 if ((*i)->isMeta()) {
967 966
968 switch((*i)->getMetaEventCode()) { 967 switch((*i)->getMetaEventCode()) {
969 968
970 case MIDI_KEY_SIGNATURE: 969 case MIDI_KEY_SIGNATURE:
971 minorKey = (int((*i)->getMetaMessage()[1]) != 0); 970 // minorKey = (int((*i)->getMetaMessage()[1]) != 0);
972 sharpKey = (int((*i)->getMetaMessage()[0]) >= 0); 971 sharpKey = (int((*i)->getMetaMessage()[0]) >= 0);
973 break; 972 break;
974 973
975 case MIDI_TEXT_EVENT: 974 case MIDI_TEXT_EVENT:
976 case MIDI_LYRIC: 975 case MIDI_LYRIC: