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

Merge branch 'spikesorting-merge' of https://github.com/open-ephys/GUI into spikesort

parents 2fba7cc7 2169872e
No related branches found
No related tags found
No related merge requests found
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName> <ProgramDataBaseFileName>$(IntDir)\</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<MultiProcessorCompilation>true</MultiProcessorCompilation> <MultiProcessorCompilation>false</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
......
...@@ -336,7 +336,7 @@ void AudioNode::process(AudioSampleBuffer& buffer, ...@@ -336,7 +336,7 @@ void AudioNode::process(AudioSampleBuffer& buffer,
// std::cout << "Samples remaining in incoming buffer: " << orphanedSamples << std::endl; // std::cout << "Samples remaining in incoming buffer: " << orphanedSamples << std::endl;
if (orphanedSamples > 0) if (orphanedSamples > 0 && (samplesInBackupBuffer + orphanedSamples < backupBuffer->getNumSamples()))
{ {
backupBuffer->addFrom(0, // destination channel backupBuffer->addFrom(0, // destination channel
samplesInBackupBuffer, // destination start sample samplesInBackupBuffer, // destination start sample
...@@ -356,7 +356,11 @@ void AudioNode::process(AudioSampleBuffer& buffer, ...@@ -356,7 +356,11 @@ void AudioNode::process(AudioSampleBuffer& buffer,
gain // gain to apply gain // gain to apply
); );
} }
else {
samplesInBackupBuffer = 0; // just throw out the buffer in the case of an overrun
// not ideal, but the output still sounds fine
}
// Simple implementation of a "noise gate" on audio output // Simple implementation of a "noise gate" on audio output
expander.process(buffer.getWritePointer(0), // left channel expander.process(buffer.getWritePointer(0), // left channel
......
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