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