Skip to content
Snippets Groups Projects
Commit 98ed6ba7 authored by Martin Spacek's avatar Martin Spacek
Browse files

Strip NULL when writing messages to file

* For original and binary recording engines
* This allows the messages file to be viewed in a text editor
parent ef997311
No related branches found
No related tags found
No related merge requests found
......@@ -339,7 +339,7 @@ void BinaryRecording::writeMessage(const MidiMessage& event, int64 timestamp)
diskWriteLock.enter();
fwrite(timestampText.toUTF8(), 1, timestampText.length(), messageFile);
fwrite(" ", 1, 1, messageFile);
fwrite(dataptr, 1, msgLength, messageFile);
fwrite(dataptr, 1, msgLength-1, messageFile);
fwrite("\n", 1, 1, messageFile);
diskWriteLock.exit();
......@@ -414,4 +414,4 @@ RecordEngineManager* BinaryRecording::getEngineManager()
{
RecordEngineManager* man = new RecordEngineManager("RAWBINARY", "Binary", &(engineFactory<BinaryRecording>));
return man;
}
\ No newline at end of file
}
......@@ -403,7 +403,7 @@ void OriginalRecording::writeMessage(const MidiMessage& event, int64 timestamp)
diskWriteLock.enter();
fwrite(timestampText.toUTF8(),1,timestampText.length(),messageFile);
fwrite(" ",1,1,messageFile);
fwrite(dataptr,1,msgLength,messageFile);
fwrite(dataptr,1,msgLength-1,messageFile);
fwrite("\n",1,1,messageFile);
diskWriteLock.exit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment