Skip to content

Commit 3366fe9

Browse files
committed
Add ability to set name, descriptor and identifier fields through the default event info struct
1 parent 9f63e75 commit 3366fe9

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

Builds/VisualStudio2013/Plugins/SpikeSorter/SpikeSorter.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
<ClCompile>
7575
<WarningLevel>Level3</WarningLevel>
7676
<Optimization>Disabled</Optimization>
77-
<SDLCheck>true</SDLCheck>
77+
<SDLCheck>false</SDLCheck>
7878
</ClCompile>
7979
<Link>
8080
<GenerateDebugInformation>true</GenerateDebugInformation>

Source/Processors/GenericProcessor/GenericProcessor.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,17 @@ void GenericProcessor::createEventChannels()
465465
int nChans = events.size();
466466
for (int i = 0; i < nChans; i++)
467467
{
468-
if (events[i].type != EventChannel::INVALID && events[i].nChannels > 0 && events[i].length > 0)
468+
DefaultEventInfo& info = events[i];
469+
if (info.type != EventChannel::INVALID && info.nChannels > 0 && info.length > 0)
469470
{
470-
EventChannel* chan = new EventChannel(events[i].type, events[i].nChannels, events[i].length, events[i].sampleRate, this, sub);
471+
EventChannel* chan = new EventChannel(info.type, info.nChannels, info.length, info.sampleRate, this, sub);
471472
chan->m_nodeID = nodeId;
473+
if (info.name.isNotEmpty())
474+
chan->setName(info.name);
475+
if (info.description.isNotEmpty())
476+
chan->setDescription(info.description);
477+
if (info.identifier.isNotEmpty())
478+
chan->setIdentifier(info.identifier);
472479
eventChannelArray.add(chan);
473480
}
474481
}

Source/Processors/GenericProcessor/GenericProcessor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@ class PLUGIN_API GenericProcessor : public AudioProcessor
531531
unsigned int nChannels{ 0 };
532532
unsigned int length{ 0 };
533533
float sampleRate{ 44100 };
534+
String name;
535+
String description;
536+
String identifier;
534537
};
535538

536539
protected:

0 commit comments

Comments
 (0)