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

Add ability to set name, descriptor and identifier fields through the default event info struct

parent 9f63e75c
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>false</SDLCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
......
...@@ -465,10 +465,17 @@ void GenericProcessor::createEventChannels() ...@@ -465,10 +465,17 @@ void GenericProcessor::createEventChannels()
int nChans = events.size(); int nChans = events.size();
for (int i = 0; i < nChans; i++) for (int i = 0; i < nChans; i++)
{ {
if (events[i].type != EventChannel::INVALID && events[i].nChannels > 0 && events[i].length > 0) DefaultEventInfo& info = events[i];
if (info.type != EventChannel::INVALID && info.nChannels > 0 && info.length > 0)
{ {
EventChannel* chan = new EventChannel(events[i].type, events[i].nChannels, events[i].length, events[i].sampleRate, this, sub); EventChannel* chan = new EventChannel(info.type, info.nChannels, info.length, info.sampleRate, this, sub);
chan->m_nodeID = nodeId; chan->m_nodeID = nodeId;
if (info.name.isNotEmpty())
chan->setName(info.name);
if (info.description.isNotEmpty())
chan->setDescription(info.description);
if (info.identifier.isNotEmpty())
chan->setIdentifier(info.identifier);
eventChannelArray.add(chan); eventChannelArray.add(chan);
} }
} }
......
...@@ -531,6 +531,9 @@ public: ...@@ -531,6 +531,9 @@ public:
unsigned int nChannels{ 0 }; unsigned int nChannels{ 0 };
unsigned int length{ 0 }; unsigned int length{ 0 };
float sampleRate{ 44100 }; float sampleRate{ 44100 };
String name;
String description;
String identifier;
}; };
protected: protected:
......
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