Add Windows support.
This commit is contained in:
parent
ee51f3ee09
commit
683ba5447f
37 changed files with 477 additions and 113 deletions
|
@ -123,11 +123,11 @@ bool MidiReader::ProcessSetTempoMetaEvent(std::ifstream& file, MetaMidiEvent& ev
|
|||
BinaryFile::GetNextByteAsInt(file, length);
|
||||
mTrackByteCount ++;
|
||||
|
||||
char buffer[length];
|
||||
BinaryFile::GetNextNBytes(file, buffer, length);
|
||||
std::string buffer;
|
||||
BinaryFile::GetNextNBytes(file, buffer.data(), length);
|
||||
mTrackByteCount += length;
|
||||
|
||||
int tempo = ByteUtils::ToInt(buffer, length);
|
||||
int tempo = ByteUtils::ToInt(buffer.data(), length);
|
||||
const int MICROSECONDS_PER_MINUTE = 60000000;
|
||||
std::cout << "Got tempo "<< tempo << "|" << MICROSECONDS_PER_MINUTE/tempo<< std::endl;
|
||||
event.SetValue(tempo);
|
||||
|
@ -331,7 +331,7 @@ bool MidiReader::ProcessTrackChunk(std::ifstream& file, bool debug)
|
|||
mTrackByteCount = 0;
|
||||
MidiTrack track;
|
||||
unsigned iter_count = 0;
|
||||
while(mTrackByteCount < chunkSize)
|
||||
while(mTrackByteCount < unsigned(chunkSize))
|
||||
{
|
||||
std::cout << "-------------" << std::endl;
|
||||
ProcessEvent(file, track);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue