Skip to content

Commit 8231876

Browse files
committed
minor fixes to channel configuration
1 parent 107ab5b commit 8231876

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/PluginProcessor.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bool ThrobAudioProcessor::setPreferredBusArrangement(
115115

116116
//--------------------------------------------------------------------------------------------------
117117

118-
void ThrobAudioProcessor::processBlock(AudioSampleBuffer& buffer, MidiBuffer& midiMessages)
118+
void ThrobAudioProcessor::processBlock(AudioSampleBuffer& buffer_, MidiBuffer& /*mm_*/)
119119
{
120120
using namespace std::chrono;
121121
AudioPlayHead::CurrentPositionInfo result;
@@ -177,8 +177,11 @@ void ThrobAudioProcessor::processBlock(AudioSampleBuffer& buffer, MidiBuffer& mi
177177
resetAmplitude = 1.0;
178178
}
179179

180-
buffer.getWritePointer(0)[i] = clockAmplitude;
181-
buffer.getWritePointer(1)[i] = resetAmplitude;
180+
buffer_.getWritePointer(0)[i] = clockAmplitude;
181+
if(buffer_.getNumChannels() > 1)
182+
{
183+
buffer_.getWritePointer(1)[i] = resetAmplitude;
184+
}
182185
}
183186
}
184187

0 commit comments

Comments
 (0)