/frameworks/base/services/core/java/com/android/server/vibrator/ |
D | RampToStepAdapter.java | 71 private List<StepSegment> convertRampToSteps(VibratorInfo info, RampSegment ramp) { in convertRampToSteps() argument 72 if (Float.compare(ramp.getStartAmplitude(), ramp.getEndAmplitude()) == 0) { in convertRampToSteps() 75 new StepSegment(ramp.getStartAmplitude(), in convertRampToSteps() 76 fillEmptyFrequency(info, ramp.getStartFrequencyHz()), in convertRampToSteps() 77 (int) ramp.getDuration())); in convertRampToSteps() 81 int stepCount = (int) (ramp.getDuration() + mStepDuration - 1) / mStepDuration; in convertRampToSteps() 85 float startFrequencyHz = fillEmptyFrequency(info, ramp.getStartFrequencyHz()); in convertRampToSteps() 86 float endFrequencyHz = fillEmptyFrequency(info, ramp.getEndFrequencyHz()); in convertRampToSteps() 88 MathUtils.lerp(ramp.getStartAmplitude(), ramp.getEndAmplitude(), pos), in convertRampToSteps() 92 int duration = (int) ramp.getDuration() - mStepDuration * (stepCount - 1); in convertRampToSteps() [all …]
|
D | SplitSegmentsAdapter.java | 58 RampSegment ramp = (RampSegment) segments.get(i); in adaptToVibrator() local 59 int splits = ((int) ramp.getDuration() + maxRampDuration - 1) / maxRampDuration; in adaptToVibrator() 64 segments.addAll(i, splitRampSegment(info, ramp, splits)); in adaptToVibrator() 76 private static List<RampSegment> splitRampSegment(VibratorInfo info, RampSegment ramp, in splitRampSegment() argument 80 float startFrequencyHz = fillEmptyFrequency(info, ramp.getStartFrequencyHz()); in splitRampSegment() 81 float endFrequencyHz = fillEmptyFrequency(info, ramp.getEndFrequencyHz()); in splitRampSegment() 82 long splitDuration = ramp.getDuration() / splits; in splitRampSegment() 83 float previousAmplitude = ramp.getStartAmplitude(); in splitRampSegment() 89 float durationRatio = (float) accumulatedDuration / ramp.getDuration(); in splitRampSegment() 93 MathUtils.lerp(ramp.getStartAmplitude(), ramp.getEndAmplitude(), durationRatio); in splitRampSegment() [all …]
|
D | RampDownAdapter.java | 215 RampSegment ramp = (RampSegment) segment; in updateDuration() local 216 return new RampSegment(ramp.getStartAmplitude(), ramp.getEndAmplitude(), in updateDuration() 217 ramp.getStartFrequencyHz(), ramp.getEndFrequencyHz(), (int) newDuration); in updateDuration() 228 StepSegment ramp = (StepSegment) segment; in isOffSegment() local 229 return ramp.getAmplitude() == 0; in isOffSegment() 231 RampSegment ramp = (RampSegment) segment; in isOffSegment() local 232 return ramp.getStartAmplitude() == 0 && ramp.getEndAmplitude() == 0; in isOffSegment()
|
D | VibrationStats.java | 273 for (RampSegment ramp : segments) { in reportComposePwle() 274 if ((ramp.getStartAmplitude() == 0) && (ramp.getEndAmplitude() == 0)) { in reportComposePwle() 275 halResult -= ramp.getDuration(); in reportComposePwle()
|
/frameworks/base/core/tests/vibrator/src/android/os/vibrator/ |
D | RampSegmentTest.java | 43 RampSegment ramp = new RampSegment(/* startAmplitude= */ 1, /* endAmplitude= */ 0, in testCreation() local 46 assertEquals(100L, ramp.getDuration()); in testCreation() 47 assertEquals(1f, ramp.getStartAmplitude()); in testCreation() 48 assertEquals(0f, ramp.getEndAmplitude()); in testCreation() 49 assertEquals(100f, ramp.getStartFrequencyHz()); in testCreation() 50 assertEquals(200f, ramp.getEndFrequencyHz()); in testCreation() 89 RampSegment ramp = new RampSegment(0, 1, 0, 0, 0); in testResolve() local 90 assertSame(ramp, ramp.resolve(100)); in testResolve() 95 RampSegment ramp = new RampSegment(1, 0, 1, 0, 0); in testApplyEffectStrength_ignoresAndReturnsSameEffect() local 96 assertSame(ramp, ramp.applyEffectStrength(VibrationEffect.EFFECT_STRENGTH_STRONG)); in testApplyEffectStrength_ignoresAndReturnsSameEffect()
|
/frameworks/av/media/libaudioprocessing/ |
D | AudioMixerBase.cpp | 249 static inline bool setVolumeRampVariables(float newVolume, int32_t ramp, in setVolumeRampVariables() argument 292 if (ramp != 0) { in setVolumeRampVariables() 297 const float inc = (newVolume - *pPrevVolume) / ramp; // could be inf, nan, subnormal in setVolumeRampVariables() 310 ramp = 0; // ramp not allowed in setVolumeRampVariables() 323 if (ramp != 0) { in setVolumeRampVariables() 329 const int32_t inc = ((intVolume << 16) - *pIntPrevVolume) / ramp; in setVolumeRampVariables() 334 ramp = 0; // ramp not allowed in setVolumeRampVariables() 339 if (ramp == 0) { in setVolumeRampVariables() 1400 const TI *in, TA *aux, bool ramp) in volumeMix() argument 1403 if (ramp) { in volumeMix() [all …]
|
/frameworks/av/media/libeffects/hapticgenerator/aidl/ |
D | HapticGeneratorContext.cpp | 250 auto ramp = std::make_shared<::android::audio_effect::haptic_generator::Ramp>( in buildProcessingChain() local 256 mProcessorsRecord.ramps.push_back(ramp); in buildProcessingChain() 257 mProcessingChain.push_back([ramp](float* out, const float* in, size_t frameCount) { in buildProcessingChain() 258 ramp->process(out, in, frameCount); in buildProcessingChain()
|
/frameworks/av/media/libaaudio/src/client/ |
D | AAudioFlowGraph.cpp | 198 for (auto& ramp : mVolumeRamps) { in setRampLengthInFrames() local 199 ramp->setLengthInFrames(numFrames); in setRampLengthInFrames()
|
/frameworks/base/services/core/jni/ |
D | com_android_server_vibrator_VibratorController.cpp | 165 static aidl::ActivePwle activePwleFromJavaPrimitive(JNIEnv* env, jobject ramp) { in activePwleFromJavaPrimitive() argument 168 static_cast<float>(env->GetFloatField(ramp, sRampClassInfo.startAmplitude)); in activePwleFromJavaPrimitive() 169 pwle.endAmplitude = static_cast<float>(env->GetFloatField(ramp, sRampClassInfo.endAmplitude)); in activePwleFromJavaPrimitive() 171 static_cast<float>(env->GetFloatField(ramp, sRampClassInfo.startFrequencyHz)); in activePwleFromJavaPrimitive() 172 pwle.endFrequency = static_cast<float>(env->GetFloatField(ramp, sRampClassInfo.endFrequencyHz)); in activePwleFromJavaPrimitive() 173 pwle.duration = static_cast<int32_t>(env->GetIntField(ramp, sRampClassInfo.duration)); in activePwleFromJavaPrimitive()
|
/frameworks/av/media/libeffects/hapticgenerator/ |
D | EffectHapticGenerator.cpp | 200 auto ramp = std::make_shared<Ramp>(channelCount); // ramp = half-wave rectifier. in HapticGenerator_buildProcessingChain() local 205 processorsRecord.ramps.push_back(ramp); in HapticGenerator_buildProcessingChain() 206 processingChain.push_back([ramp](float *out, const float *in, size_t frameCount) { in HapticGenerator_buildProcessingChain() 207 ramp->process(out, in, frameCount); in HapticGenerator_buildProcessingChain()
|
/frameworks/base/core/proto/android/server/vibrator/ |
D | vibratormanagerservice.proto | 59 optional RampSegmentProto ramp = 4; field
|
/frameworks/av/media/libaudioprocessing/include/media/ |
D | AudioMixerBase.h | 243 void volumeMix(TO *out, size_t outFrames, const TI *in, TA *aux, bool ramp);
|
/frameworks/base/core/java/android/widget/ |
D | Magnifier.java | 991 final float zoom, final int ramp, final float elevation, final float cornerRadius, in InternalPopupWindow() argument 1002 mRamp = ramp; in InternalPopupWindow()
|