Merge pull request #574 from wrwrabbit/4.2.3

4.2.3
This commit is contained in:
vivabelarus 2025-09-22 15:46:13 +00:00 committed by GitHub
commit 096da0df1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 8 deletions

View file

@ -1,6 +1,6 @@
package org.telegram.messenger.partisan;
public class PartisanVersion {
public static final String PARTISAN_VERSION_STRING = "4.2.2";
public static int PARTISAN_BUILD_VERSION = 1648;
public static final String PARTISAN_VERSION_STRING = "4.2.3";
public static int PARTISAN_BUILD_VERSION = 1649;
}

View file

@ -13,18 +13,18 @@ import java.util.function.BiConsumer;
public class TesterSettingsParametersProvider implements ParametersProvider {
@Override
public double getPitchFactor() {
return TesterSettings.pitchFactor.get().get();
return TesterSettings.pitchFactor.get().orElse(1.0f);
}
@Override
public double getTimeStretchFactor() {
return TesterSettings.timeStretchFactor.get().get();
return TesterSettings.timeStretchFactor.get().orElse(1.0f);
}
@Override
public Map<Integer, Integer> getSpectrumDistortionMap(int sampleRate) {
Map<Integer, Integer> distortionMap = accumulateDistortionParams(
TesterSettings.spectrumDistorterParams.get().get(),
TesterSettings.spectrumDistorterParams.get().orElse(""),
new HashMap<>(),
(map, distortionParts) -> {
int fromHz = Integer.parseInt(distortionParts[0]);
@ -39,7 +39,7 @@ public class TesterSettingsParametersProvider implements ParametersProvider {
@Override
public List<TimeDistorter.DistortionInterval> getTimeDistortionList() {
List<TimeDistorter.DistortionInterval> distortionMap = accumulateDistortionParams(
TesterSettings.timeDistortionParams.get().get(),
TesterSettings.timeDistortionParams.get().orElse(""),
new ArrayList<>(),
(list, distortionParts) -> {
TimeDistorter.DistortionInterval interval = new TimeDistorter.DistortionInterval();
@ -74,11 +74,11 @@ public class TesterSettingsParametersProvider implements ParametersProvider {
@Override
public double getF0Shift() {
return TesterSettings.f0Shift.get().get();
return TesterSettings.f0Shift.get().orElse(1.0f);
}
@Override
public double getFormantRatio() {
return TesterSettings.formantRatio.get().get();
return TesterSettings.formantRatio.get().orElse(1.0f);
}
}