Skip to content

Commit 017adbf

Browse files
committed
Fixed: Processing: Sample reduction did not always work and improved logging.
1 parent 35614ec commit 017adbf

4 files changed

Lines changed: 23 additions & 31 deletions

File tree

documentation/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## 16.5.1
4+
5+
* Fixed: Processing: Sample reduction did not always work and improved logging.
6+
37
## 16.5.0
48

59
* Added support for discoDSP Bliss.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>de.mossgrabers</groupId>
77
<artifactId>convertwithmoss</artifactId>
8-
<version>16.5.0</version>
8+
<version>16.5.1</version>
99
<packaging>jar</packaging>
1010
<name>ConvertWithMoss</name>
1111
<organization>

src/main/java/de/mossgrabers/convertwithmoss/core/ConverterBackend.java

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

src/main/resources/Strings.properties

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TITLE=ConvertWithMoss 16.5.0
1+
TITLE=ConvertWithMoss 16.5.1
22

33
##################################################################################
44
#
@@ -100,7 +100,7 @@ IDS_NOTIFY_ERR_WRONG_CHUNK_ID=Mismatch of chunk ID: %1 vs. %2.\n
100100
IDS_NOTIFY_COMBINED_TO_STEREO=Split stereo files were converted to stereo files.\n
101101
IDS_NOTIFY_NOT_COMBINED_TO_STEREO=Split stereo files could not be converted to stereo files.\n
102102
IDS_NOTIFY_OK=OK.\n
103-
IDS_NOTIFY_REDUCED_TO_NUM_SAMPLES=Reduced to %1 samples.\n
103+
IDS_NOTIFY_REDUCED_TO_NUM_SAMPLES=Reduced to %1 samples.
104104
IDS_NOTIFY_COULD_NOT_RESAMPLE=Could not resample: %1\n
105105

106106
IDS_ERR_COULD_NOT_STORE_CONFIG=Could not store configuration.
@@ -120,14 +120,14 @@ IDS_ERR_LIMITED_INSTRUMENTS=Limited to %1 instruments (from %2).\n
120120
IDS_ERR_SAMPLE_FILE_DOES_NOT_EXIST=The sample file does not exist or cannot be accessed: %1.
121121
IDS_ERR_SOURCE_CONTAINS_LAYERS=The source multi-sample contains layered samples which is not supported by the destination format.\n
122122

123-
IDS_PROCESSING_PROCESS=Processing:
124-
IDS_PROCESSING_COMBINE_TO_STEREO= Combine Stereo...
125-
IDS_PROCESSING_REDUCE_SAMPLES= Reduce Samples to %1...
126-
IDS_PROCESSING_NORMALIZING= Normalize...
127-
IDS_PROCESSING_MAKE_MONO= Make Mono...
128-
IDS_PROCESSING_TRIM= Trim...
129-
IDS_PROCESSING_REDUCE_BIT_DEPTH_TO= Reduce Bit-Depth to %1...
130-
IDS_PROCESSING_REDUCE_FREQUENCY_TO= Reduce Frequency to %1...
123+
IDS_PROCESSING_PROCESS=Processing:
124+
IDS_PROCESSING_COMBINE_TO_STEREO=Combine Stereo...
125+
IDS_PROCESSING_REDUCE_SAMPLES=Reduce Samples to %1...
126+
IDS_PROCESSING_NORMALIZING=Normalize...
127+
IDS_PROCESSING_MAKE_MONO=Make Mono...
128+
IDS_PROCESSING_TRIM=Trim...
129+
IDS_PROCESSING_REDUCE_BIT_DEPTH_TO=Reduce Bit-Depth to %1...
130+
IDS_PROCESSING_REDUCE_FREQUENCY_TO=Reduce Frequency to %1...
131131
IDS_PROCESSING_REDUCE_BITE_DEPTH_NOT_SUPPORTED=The selected processing bit-depth (%1 bit) is not supported by the selected destination format (only %2).
132132

133133
IDS_CLI_UNKNOWN_SOURCE_FORMAT=Invalid value for source format: %1\nAllowed values are: %2\n

0 commit comments

Comments
 (0)