player: add more pitches values

This commit is contained in:
Yuriy Liskov
2026-03-08 00:35:08 +02:00
parent 245e778c93
commit 4b60b1370a
2 changed files with 15 additions and 11 deletions

View File

@@ -122,11 +122,17 @@ public class HQDialogController extends BasePlayerController {
}
private void addVideoBufferCategory() {
if (getPlayer() == null) {
return;
}
addCategoryInt(AppDialogUtil.createVideoBufferCategory(getContext(),
() -> getPlayer().restartEngine()));
}
private void addAudioDelayCategory() {
if (getPlayer() == null) {
return;
}
addCategoryInt(AppDialogUtil.createAudioShiftCategory(getContext(),
() -> getPlayer().restartEngine()));
}
@@ -136,11 +142,17 @@ public class HQDialogController extends BasePlayerController {
}
private void addAudioLanguage() {
if (getPlayer() == null) {
return;
}
addCategoryInt(AppDialogUtil.createAudioLanguageCategory(getContext(),
() -> getPlayer().restartEngine()));
}
private void addNetworkEngine() {
if (getPlayer() == null) {
return;
}
addCategoryInt(AppDialogUtil.createNetworkEngineCategory(getContext(),
() -> getPlayer().restartEngine()));
}

View File

@@ -456,18 +456,10 @@ public class AppDialogUtil {
List<OptionItem> options = new ArrayList<>();
//for (int pitchRaw : Helpers.range(1, 20 * 4, 1)) {
// float pitch = pitchRaw / (10f * 4);
// options.add(UiOptionItem.from(Helpers.toString(pitch),
// optionItem -> {
// playerManager.setPitch(pitch);
// playerData.setPitch(pitch);
// },
// Helpers.floatEquals(pitch, playerManager.getPitch())));
//}
addPitches(context, options, Helpers.range(0.025f, 0.975f, 0.025f));
addPitches(context, options, new float[]{ 0.985f, 0.990f, 0.995f }); // Custom pitches
//addPitches(context, options, new float[]{ 0.985f, 0.990f, 0.995f }); // Custom pitches
addPitches(context, options, new float[]{ 0.985f }); // Custom pitches
addPitches(context, options, Helpers.range(0.990f, 0.997f, 0.001f));
addPitches(context, options, Helpers.range(1f, 2f, 0.025f));
return OptionCategory.from(PITCH_EFFECT_ID, OptionCategory.TYPE_RADIO_LIST, title, options);