@@ -349,7 +349,7 @@ private void processSamples (final IMultisampleSource multisampleSource)
349349 {
350350 final List <IGroup > groups = multisampleSource .getNonEmptyGroups (false );
351351
352- /////////////////////////////////////////////////////////////////////////////////////////////////////////
352+ ////////////////////////////////////////////////////////////////////////////////////////////////
353353 // Combine split-mono samples to stereo samples if necessary for further processing
354354
355355 final boolean hasMaximumNumberOfSamples = this .detectionSettings .maxNumberOfSamples > 0 ;
@@ -359,14 +359,14 @@ private void processSamples (final IMultisampleSource multisampleSource)
359359 final Optional <IGroup > stereoGroup = ZoneChannels .combineSplitStereo (groups );
360360 if (stereoGroup .isPresent ())
361361 {
362- this .notifier .log ("IDS_NOTIFY_COMBINED_TO_STEREO" );
363362 groups .clear ();
364363 groups .add (stereoGroup .get ());
365364 }
366- this .notifier .logError ("IDS_NOTIFY_NOT_COMBINED_TO_STEREO" );
365+ else
366+ this .notifier .logError ("IDS_NOTIFY_NOT_COMBINED_TO_STEREO" );
367367 }
368368
369- /////////////////////////////////////////////////////////////////////////////////////////////////////////
369+ ////////////////////////////////////////////////////////////////////////////////////////////////
370370 // Reduce the number of samples if necessary
371371
372372 if (hasMaximumNumberOfSamples && MultiSampleReducer .reduce (groups , this .detectionSettings .maxNumberOfSamples ) > 0 )
@@ -376,38 +376,26 @@ private void processSamples (final IMultisampleSource multisampleSource)
376376 for (final IGroup group : groups )
377377 if (!group .getSampleZones ().isEmpty ())
378378 finalGroups .add (group );
379- this .notifier .logError ("IDS_NOTIFY_REDUCED_TO_NUM_SAMPLES" , Integer .toString (this .detectionSettings .maxNumberOfSamples ));
379+ groups .clear ();
380+ groups .addAll (finalGroups );
381+ this .notifier .log ("IDS_NOTIFY_REDUCED_TO_NUM_SAMPLES" , Integer .toString (this .detectionSettings .maxNumberOfSamples ));
380382 }
383+ multisampleSource .setGroups (groups );
381384
382385 final List <ISampleZone > sampleZones = new ArrayList <> ();
383386 for (final IGroup group : groups )
384387 sampleZones .addAll (group .getSampleZones ());
385388
386389 if (this .detectionSettings .enableMakeMono )
387- {
388- this .notifier .logText (" " );
389390 this .notifier .log ("IDS_PROCESSING_MAKE_MONO" );
390- }
391391 if (this .detectionSettings .enableTrimSample )
392- {
393- this .notifier .logText (" " );
394392 this .notifier .log ("IDS_PROCESSING_TRIM" );
395- }
396393 if (this .detectionSettings .reduceBitDepth > 0 )
397- {
398- this .notifier .logText (" " );
399394 this .notifier .log ("IDS_PROCESSING_REDUCE_BIT_DEPTH_TO" , Integer .toString (this .detectionSettings .reduceBitDepth ));
400- }
401395 if (this .detectionSettings .reduceFrequency > 0 )
402- {
403- this .notifier .logText (" " );
404396 this .notifier .log ("IDS_PROCESSING_REDUCE_FREQUENCY_TO" , Integer .toString (this .detectionSettings .reduceFrequency ));
405- }
406397 if (this .detectionSettings .enableNormalize )
407- {
408- this .notifier .logText (" " );
409398 this .notifier .log ("IDS_PROCESSING_NORMALIZING" );
410- }
411399 this .notifier .log ("IDS_NOTIFY_LINE_FEED" );
412400 AudioSampleReducer .reduceSamples (sampleZones , this .detectionSettings .enableMakeMono , this .detectionSettings .enableTrimSample , this .detectionSettings .reduceBitDepth , this .detectionSettings .reduceFrequency , this .detectionSettings .enableNormalize );
413401 }
0 commit comments