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

ChannelMappingNode works now

parent 0147fcb9
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,13 @@ ChannelMappingNode::ChannelMappingNode()
{
referenceArray.resize(1024); // make room for 1024 channels
channelArray.resize(1024);
for (int i = 0; i < referenceArray.size(); i++)
{
referenceArray.set(i, -1);
channelArray.set(i, i);
}
}
ChannelMappingNode::~ChannelMappingNode()
......@@ -54,6 +61,7 @@ void ChannelMappingNode::updateSettings()
{
if (getNumInputs() > 0)
channelBuffer.setSize(getNumInputs(), 10000);
}
......@@ -75,10 +83,10 @@ void ChannelMappingNode::process(AudioSampleBuffer& buffer,
int& nSamples)
{
// copy everything into the channel buffer
channelBuffer.setDataToReferTo(buffer.getArrayOfChannels(),
buffer.getNumChannels(),
buffer.getNumSamples());
// use copy constructor to set the data to refer to
channelBuffer = buffer; //.setDataToReferTo(buffer.getArrayOfChannels(),
// buffer.getNumChannels(),
// buffer.getNumSamples());
// copy it back into the buffer according to the channel mapping
buffer.clear();
......
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