Skip to content
Snippets Groups Projects
Commit 0e6e60f2 authored by jsiegle's avatar jsiegle
Browse files

Shift event timestamps by sample position

parent cd8f7e2f
No related branches found
No related tags found
No related merge requests found
......@@ -567,10 +567,12 @@ void RecordNode::writeEventBuffer(MidiMessage& event, int samplePosition) //, in
//std::cout << "Received event!" << std::endl;
const uint8* dataptr = event.getRawData();
int16 samplePos = (int16) samplePosition;
uint64_t samplePos = (uint64_t) samplePosition;
uint64_t eventTimestamp = timestamp + samplePos;
// write timestamp (for buffer only, not the actual event timestamp!!!!!)
fwrite(&timestamp, // ptr
fwrite(&eventTimestamp, // ptr
8, // size of each element
1, // count
eventChannel->file); // ptr to FILE object
......
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