Skip to content

Commit 4d7fc1b

Browse files
committed
Fix issue #37 Guitarix randomly crashes REAPER when setting FX offline
1 parent 9fac3b5 commit 4d7fc1b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Source/GuitarixProcessor.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,6 @@ void GuitarixProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
858858
cloneSettingsToMachineR();
859859

860860
gx_inited();
861-
//gx_load_preset(machine, "Scratchpad", "Putilin");
862861
}
863862

864863
void GuitarixProcessor::releaseResources()
@@ -967,8 +966,6 @@ void GuitarixProcessor::processBlock (juce::AudioBuffer<float>& buffer, juce::Mi
967966

968967
if(out[0]==0 || out[1]==0)
969968
{
970-
parallelBuffer = buf[1];
971-
sampleToProcess = n;
972969
process(buf, n);
973970
}
974971
else
@@ -1004,8 +1001,6 @@ void GuitarixProcessor::processBlock (juce::AudioBuffer<float>& buffer, juce::Mi
10041001
float *p[2];
10051002
p[0]=out[0]+ppos;
10061003
p[1]=out[1]+ppos;
1007-
sampleToProcess = quantum;
1008-
parallelBuffer = p[1];
10091004
process(p, quantum);
10101005
ppos+=quantum;
10111006
DBGRT(" PPOS:"<<ppos<<" after processing "<<quantum<<" unprocessed:"<<(wpos>=ppos?wpos-ppos:olen-ppos+wpos));
@@ -1122,6 +1117,8 @@ void GuitarixProcessor::process(float *out[2], int n)
11221117
}
11231118
else
11241119
{
1120+
sampleToProcess = n;
1121+
parallelBuffer = out[1];
11251122
if (proc.getProcess()) {
11261123
proc.runProcess();
11271124
} else {

0 commit comments

Comments
 (0)