@@ -60,7 +60,7 @@ class ConvolutionDemo
6060 dryGain.setCurrentAndTargetValue (0 .3f );
6161
6262 // Configure convolver with typical layout
63- convolver.setTypicalLayout (256 , {256 , 1024 , 4096 });
63+ convolver.setTypicalLayout (256 , { 256 , 1024 , 4096 });
6464
6565 // Create UI
6666 createUI ();
@@ -293,7 +293,9 @@ class ConvolutionDemo
293293 impulseResponseData[static_cast <size_t > (i)] = impulseResponseBuffer.getSample (0 , i) * normalizationGain;
294294
295295 // Set impulse response in convolver
296- convolver.setImpulseResponse (impulseResponseData);
296+ yup::PartitionedConvolver::IRLoadOptions loadOptions;
297+ loadOptions.trimEndSilenceBelowDb = -60 .0f ;
298+ convolver.setImpulseResponse (impulseResponseData, loadOptions);
297299 hasImpulseResponse = true ;
298300
299301 std::cout << " Loaded impulse response: " << file.getFileName () << std::endl;
@@ -388,7 +390,7 @@ class ConvolutionDemo
388390 irWaveformDisplay.setMargins (25 , 25 , 25 , 25 );
389391
390392 // Add grid lines
391- irWaveformDisplay.setVerticalGridLines ({ 0.0 , 1.0 });
393+ irWaveformDisplay.setVerticalGridLines ({ 0.0 , 1.0 });
392394 irWaveformDisplay.setHorizontalGridLines ({ -1.0 , -0.5 , 0.5 , 1.0 });
393395 irWaveformDisplay.addHorizontalGridLine (0.0 , yup::Color (0xFF666666 ), 1 .0f , true );
394396
0 commit comments