mirror of
https://github.com/yuliskov/SmartTube.git
synced 2026-03-13 15:20:26 +08:00
player: add more pitches values
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user