Home
last modified time | relevance | path

Searched refs:amplitude (Results 1 – 25 of 43) sorted by relevance

12

/frameworks/base/media/tests/audiotests/
Dshared_mem_test.cpp80 long amplitude; in Test01() local
86 amplitude = 1000; in Test01()
88 Generate(smpBuf, BUF_SZ, amplitude, phi, dPhi); // fill buffer in Test01()
134 void AudioTrackTest::Generate(short *buffer, long bufferSz, long amplitude, unsigned long &phi, lon… in Generate() argument
138 buffer[i0] = ComputeSine( amplitude, phi); in Generate()
149 short AudioTrackTest::ComputeSine(long amplitude, long phi) in ComputeSine() argument
155 sample = (amplitude*sin1024[(phi>>22) & 0x3ff]) >> 15; in ComputeSine()
158 l1 = (amplitude*sin1024[((phi>>22) + 256) & 0x3ff]) >> 15; // 2^15*cosine in ComputeSine()
Dshared_mem_test.h16 void Generate(short *buffer, long bufferSz, long amplitude, unsigned long &phi, long dPhi);
18 short ComputeSine(long amplitude, long phi);
/frameworks/base/samples/demo/haptic-assessment/
DREADME.txt9 2) One shot vibration with 20ms duration at max amplitude.
11 3) Waveform vibration with 500ms duration at half amplitude, then 500ms duration
12 at max amplitude. This will pass if the device supports vibration amplitude
/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/util/
DBurnInHelper.kt34 fun getBurnInOffset(amplitude: Int, xAxis: Boolean): Int { in getBurnInOffset()
36 amplitude.toFloat(), in getBurnInOffset()
66 private fun zigzag(x: Float, amplitude: Float, period: Float): Float { in zigzag()
69 return MathUtils.lerp(0f, amplitude, interpolationAmount) in zigzag()
DBurnInHelperWrapper.kt24 fun burnInOffset(amplitude: Int, xAxis: Boolean): Int { in burnInOffset()
25 return getBurnInOffset(amplitude, xAxis) in burnInOffset()
/frameworks/base/core/java/android/os/
DVibrationEffect.java189 public static VibrationEffect createOneShot(long milliseconds, int amplitude) { in createOneShot() argument
190 if (amplitude == 0) { in createOneShot()
193 + "or between 1 and 255 inclusive (amplitude=" + amplitude + ")"); in createOneShot()
195 return createWaveform(new long[]{milliseconds}, new int[]{amplitude}, -1 /* repeat */); in createOneShot()
1007 float amplitude = stepSegment.getAmplitude(); in castToValidStepSegmentForOffOnTimingsOrNull() local
1008 if (amplitude != 0 && amplitude != DEFAULT_AMPLITUDE) { in castToValidStepSegmentForOffOnTimingsOrNull()
1425 float amplitude = extractTargetAmplitude(targetParameter, /* target2= */ null); in addTransition() local
1427 addTransitionSegment(duration, amplitude, frequencyHz); in addTransition()
1464 float amplitude = extractTargetAmplitude(targetParameter1, targetParameter2); in addTransition() local
1466 addTransitionSegment(duration, amplitude, frequencyHz); in addTransition()
[all …]
/frameworks/base/core/java/android/os/vibrator/
DVibrationEffectSegment.java181 protected static boolean amplitudeRequiresAmplitudeControl(float amplitude) { in amplitudeRequiresAmplitudeControl() argument
182 return (amplitude != 0) in amplitudeRequiresAmplitudeControl()
183 && (amplitude != 1) in amplitudeRequiresAmplitudeControl()
184 && (amplitude != VibrationEffect.DEFAULT_AMPLITUDE); in amplitudeRequiresAmplitudeControl()
DStepSegment.java53 public StepSegment(float amplitude, float frequencyHz, int duration) { in StepSegment() argument
54 mAmplitude = amplitude; in StepSegment()
/frameworks/base/services/core/java/com/android/server/vibrator/
DClippingAmplitudeAndFrequencyAdapter.java69 private float clampAmplitude(VibratorInfo info, float frequencyHz, float amplitude) { in clampAmplitude() argument
74 return amplitude; in clampAmplitude()
76 return MathUtils.min(amplitude, mapping.getMaxAmplitude(frequencyHz)); in clampAmplitude()
DRampDownAdapter.java193 private List<VibrationEffectSegment> createStepsDown(float amplitude, float frequency, in createStepsDown() argument
197 float amplitudeStep = amplitude / stepCount; in createStepsDown()
200 steps.add(new StepSegment(amplitude - i * amplitudeStep, frequency, mStepDuration)); in createStepsDown()
207 private static RampSegment createRampDown(float amplitude, float frequency, long duration) { in createRampDown() argument
208 return new RampSegment(amplitude, /* endAmplitude= */ 0, frequency, frequency, in createRampDown()
DVibratorController.java233 public void setAmplitude(float amplitude) { in setAmplitude() argument
236 mNativeWrapper.setAmplitude(amplitude); in setAmplitude()
239 mCurrentAmplitude = amplitude; in setAmplitude()
425 private static native void setAmplitude(long nativePtr, float amplitude); in setAmplitude() argument
476 public void setAmplitude(float amplitude) { in setAmplitude() argument
477 setAmplitude(mNativePtr, amplitude); in setAmplitude()
DAbstractVibratorStep.java133 protected void changeAmplitude(float amplitude) { in changeAmplitude() argument
136 "Amplitude changed on vibrator " + getVibratorId() + " to " + amplitude); in changeAmplitude()
138 controller.setAmplitude(amplitude); in changeAmplitude()
DSetAmplitudeVibratorStep.java108 float amplitude = stepSegment.getAmplitude(); in play() local
109 if (amplitude == 0) { in play()
123 changeAmplitude(amplitude); in play()
/frameworks/av/cmds/stagefright/
DSineSource.cpp85 int16_t amplitude = (int16_t)(32767.0 * sin(x)); in read() local
87 *ptr++ = amplitude; in read()
89 *ptr++ = amplitude; in read()
/frameworks/base/core/java/com/android/internal/vibrator/persistence/
DSerializedAmplitudeStepWaveform.java108 void addDurationAndAmplitude(long durationMs, int amplitude) { in addDurationAndAmplitude() argument
110 mAmplitudes.add(amplitude); in addDurationAndAmplitude()
193 int amplitude = VALUE_AMPLITUDE_DEFAULT.equals(rawAmplitude) in parseWaveformEntry() local
199 waveformBuilder.addDurationAndAmplitude(durationMs, amplitude); in parseWaveformEntry()
DVibrationEffectXmlSerializer.java166 private static int toAmplitudeInt(float amplitude) { in toAmplitudeInt() argument
167 return Float.compare(amplitude, VibrationEffect.DEFAULT_AMPLITUDE) == 0 in toAmplitudeInt()
169 : Math.round(amplitude * VibrationEffect.MAX_AMPLITUDE); in toAmplitudeInt()
/frameworks/native/cmds/idlcli/vibrator/
DCommandSetAmplitude.cpp39 if (auto amplitude = args.pop<decltype(mAmplitude)>()) { in doArgs() local
40 mAmplitude = *amplitude; in doArgs()
/frameworks/av/media/libaaudio/examples/write_sine/src/
Dwrite_sine_callback.cpp97 double amplitude; in testOpenPlayClose() local
101 amplitude = 0.2; in testOpenPlayClose()
105 amplitude = 0.0; in testOpenPlayClose()
109 myData.sineOscillators[i].setAmplitude(amplitude); in testOpenPlayClose()
/frameworks/av/media/libaaudio/examples/utils/
DSineGenerator.h95 void setAmplitude(double amplitude) { in setAmplitude() argument
96 mAmplitude = amplitude; in setAmplitude()
/frameworks/native/services/inputflinger/
DVibrationElement.cpp75 void VibrationElement::addChannel(int32_t vibratorId, uint8_t amplitude) { in addChannel() argument
76 channels.push_back(std::make_pair(vibratorId, amplitude)); in addChannel()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/
DKeyguardQuickAffordanceViewBinder.kt212 val amplitude = in <lambda>() constant
220 -amplitude / 2, in <lambda>()
221 amplitude / 2, in <lambda>()
DKeyguardBottomAreaViewBinder.kt428 val amplitude = in <lambda>() constant
436 -amplitude / 2, in <lambda>()
437 amplitude / 2, in <lambda>()
/frameworks/native/services/inputflinger/include/
DVibrationElement.h45 void addChannel(int32_t vibratorId, uint8_t amplitude);
/frameworks/native/services/vibratorservice/benchmarks/
DVibratorHalControllerBenchmarks.cpp294 auto amplitude = 1.0f;
295 auto setAmplitudeFn = [&](auto hal) { return hal->setAmplitude(amplitude); }; in __anon599d61ff0902()
338 auto amplitude = 1.0f;
339 auto setAmplitudeFn = [&](auto hal) { return hal->setAmplitude(amplitude); }; in __anon599d61ff0d02()
/frameworks/base/services/tests/vibrator/utils/com/android/server/vibrator/
DFakeVibratorControllerProvider.java114 public void setAmplitude(float amplitude) { in setAmplitude() argument
115 mAmplitudes.add(amplitude); in setAmplitude()

12