Skip to content
Snippets Groups Projects
Commit f84d120d authored by Aaron Cuevas Lopez's avatar Aaron Cuevas Lopez
Browse files

Include full word on TTL messages

parent da2aa37e
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,8 @@ SourceNode::SourceNode(const String& name_)
}
numEventChannels = dataThread->getNumEventChannels();
eventChannelState = new int[numEventChannels];
//eventChannelState = new int[numEventChannels];
eventChannelState.malloc(numEventChannels);
for (int i = 0; i < numEventChannels; i++)
{
eventChannelState[i] = 0;
......@@ -77,7 +78,7 @@ SourceNode::SourceNode(const String& name_)
else
{
enabledState(false);
eventChannelState = 0;
// eventChannelState = 0;
numEventChannels = 0;
}
......@@ -85,7 +86,8 @@ SourceNode::SourceNode(const String& name_)
startTimer(sourceCheckInterval);
timestamp = 0;
eventCodeBuffer = new uint64[10000]; //10000 samples per buffer max?
//eventCodeBuffer = new uint64[10000]; //10000 samples per buffer max?
eventCodeBuffer.malloc(10000);
}
......@@ -100,8 +102,8 @@ SourceNode::~SourceNode()
}
if (eventChannelState)
delete[] eventChannelState;
//if (eventChannelState)
// delete[] eventChannelState;
}
DataThread* SourceNode::getThread()
......@@ -412,7 +414,9 @@ void SourceNode::process(AudioSampleBuffer& buffer,
TTL, // eventType
i, // sampleNum
0, // eventID
c // eventChannel
c, // eventChannel
8,
(uint8*)(&eventCodeBuffer[i])
);
}
else
......@@ -426,7 +430,9 @@ void SourceNode::process(AudioSampleBuffer& buffer,
TTL, // eventType
i, // sampleNum
1, // eventID
c // eventChannel
c, // eventChannel
8,
(uint8*)(&eventCodeBuffer[i])
);
......
......@@ -118,8 +118,10 @@ private:
DataBuffer* inputBuffer;
uint64 timestamp;
uint64* eventCodeBuffer;
int* eventChannelState;
//uint64* eventCodeBuffer;
//int* eventChannelState;
HeapBlock<uint64> eventCodeBuffer;
HeapBlock<int> eventChannelState;
int ttlState;
......
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