Home
last modified time | relevance | path

Searched refs:rate (Results 1 – 25 of 175) sorted by relevance

1234567

/frameworks/base/services/tests/servicestests/src/com/android/server/notification/
DRateEstimatorTest.java41 final float rate = mEstimator.getRate(mTestStartTime - 1000L); in testRunningTimeBackwardDoesntExplodeGet() local
42 assertFalse(Float.isInfinite(rate)); in testRunningTimeBackwardDoesntExplodeGet()
43 assertFalse(Float.isNaN(rate)); in testRunningTimeBackwardDoesntExplodeGet()
56 final float rate = mEstimator.getRate(mTestStartTime); in testInstantaneousEventsDontExplodeGet() local
57 assertFalse(Float.isInfinite(rate)); in testInstantaneousEventsDontExplodeGet()
58 assertFalse(Float.isNaN(rate)); in testInstantaneousEventsDontExplodeGet()
66 final float rate = mEstimator.getRate(nextEventTime); in testInstantaneousBurstIsEstimatedUnderTwoPercent() local
67 assertLessThan("Rate", rate, 20f); in testInstantaneousBurstIsEstimatedUnderTwoPercent()
75 final float rate = mEstimator.getRate(nextEventTime); in testCompactBurstIsEstimatedUnderTwoPercent() local
76 assertLessThan("Rate", rate, 20f); in testCompactBurstIsEstimatedUnderTwoPercent()
[all …]
/frameworks/wilhelm/src/itf/
DIPlaybackRate.c22 static SLresult IPlaybackRate_SetRate(SLPlaybackRateItf self, SLpermille rate) in IPlaybackRate_SetRate() argument
28 if (!(thiz->mMinRate <= rate && rate <= thiz->mMaxRate)) { in IPlaybackRate_SetRate()
36 result = android_audioPlayer_setPlaybackRateAndConstraints(ap, rate, thiz->mProperties); in IPlaybackRate_SetRate()
44 thiz->mRate = rate; in IPlaybackRate_SetRate()
62 SLpermille rate = thiz->mRate; in IPlaybackRate_GetRate() local
64 *pRate = rate; in IPlaybackRate_GetRate()
128 SLpermille rate, SLuint32 *pCapabilities) in IPlaybackRate_GetCapabilitiesOfRate() argument
138 if (!(thiz->mMinRate <= rate && rate <= thiz->mMaxRate)) { in IPlaybackRate_GetCapabilitiesOfRate()
DIRatePitch.c22 static SLresult IRatePitch_SetRate(SLRatePitchItf self, SLpermille rate) in IRatePitch_SetRate() argument
27 if (!(thiz->mMinRate <= rate && rate <= thiz->mMaxRate)) { in IRatePitch_SetRate()
31 thiz->mRate = rate; in IRatePitch_SetRate()
49 SLpermille rate = thiz->mRate; in IRatePitch_GetRate() local
51 *pRate = rate; in IRatePitch_GetRate()
DIVisualization.c23 slVisualizationCallback callback, void *pContext, SLmilliHertz rate) in IVisualization_RegisterVisualizationCallback() argument
27 if (!(0 < rate && rate <= 20000)) { in IVisualization_RegisterVisualizationCallback()
34 thiz->mRate = rate; in IVisualization_RegisterVisualizationCallback()
/frameworks/ml/bordeaux/learning/multiclass_pa/native/
Dmulticlass_pa.cpp123 float rate = loss / twice_norm_square; in TrainOneExample() local
124 if (rate > aggressiveness_) { in TrainOneExample()
125 rate = aggressiveness_; in TrainOneExample()
131 parameters_[target][i] += rate * inputs[i]; in TrainOneExample()
133 parameters_[other_class][i] -= rate * inputs[i]; in TrainOneExample()
156 float rate = loss / twice_norm_square; in SparseTrainOneExample() local
157 if (rate > aggressiveness_) { in SparseTrainOneExample()
158 rate = aggressiveness_; in SparseTrainOneExample()
164 parameters_[target][inputs[i].first] += rate * inputs[i].second; in SparseTrainOneExample()
166 parameters_[other_class][inputs[i].first] -= rate * inputs[i].second; in SparseTrainOneExample()
/frameworks/base/services/core/java/com/android/server/notification/
DRateEstimator.java38 float rate; in update() local
41 rate = 0f; in update()
45 rate = (float) (1.0 / mInterarrivalTime); in update()
48 return rate; in update()
/frameworks/wilhelm/tests/mimeUri/
DslesTestSlowDownUri.cpp71 SLpermille minRate, maxRate, stepSize, rate = 1000; in PlayEventCallback() local
75 SLresult res = (*pRateItf)->GetRate(pRateItf, &rate); CheckErr(res); in PlayEventCallback()
78 fprintf(stdout, "old rate = %d, minRate=%d, maxRate=%d\n", rate, minRate, maxRate); in PlayEventCallback()
79 rate /= 2; in PlayEventCallback()
80 if (rate < minRate) { in PlayEventCallback()
81 rate = minRate; in PlayEventCallback()
83 fprintf(stdout, "new rate = %d\n", rate); in PlayEventCallback()
84 res = (*pRateItf)->SetRate(pRateItf, rate); CheckErr(res); in PlayEventCallback()
86 fprintf(stderr, "new playback rate %d per mille is unsupported\n", rate); in PlayEventCallback()
290 SLpermille rate = 1234; in TestSlowDownUri() local
[all …]
/frameworks/base/core/java/android/view/
DOrientationListener.java58 public OrientationListener(Context context, int rate) { in OrientationListener() argument
59 mOrientationEventLis = new OrientationEventListenerInternal(context, rate); in OrientationListener()
67 OrientationEventListenerInternal(Context context, int rate) { in OrientationEventListenerInternal() argument
68 super(context, rate); in OrientationEventListenerInternal()
/frameworks/av/media/libstagefright/
DMediaSync.cpp244 void MediaSync::updatePlaybackRate_l(float rate) { in updatePlaybackRate_l() argument
245 if (rate > mPlaybackRate) { in updatePlaybackRate_l()
248 mPlaybackRate = rate; in updatePlaybackRate_l()
250 mMediaClock->setPlaybackRate(rate); in updatePlaybackRate_l()
360 status_t MediaSync::setVideoFrameRateHint(float rate) { in setVideoFrameRateHint() argument
362 if (rate < 0.f) { in setVideoFrameRateHint()
366 mFrameScheduler->init(rate); in setVideoFrameRateHint()
423 status_t MediaSync::setPlaybackSettings(const AudioPlaybackRate &rate) { in setPlaybackSettings() argument
426 status_t err = setPlaybackSettings_l(rate); in setPlaybackSettings()
429 updatePlaybackRate_l(rate.mSpeed); in setPlaybackSettings()
[all …]
DMediaClock.cpp92 void MediaClock::setPlaybackRate(float rate) { in setPlaybackRate() argument
93 CHECK_GE(rate, 0.0); in setPlaybackRate()
96 mPlaybackRate = rate; in setPlaybackRate()
107 mPlaybackRate = rate; in setPlaybackRate()
/frameworks/av/media/libmedia/
DIMediaPlayer.cpp184 status_t setPlaybackSettings(const AudioPlaybackRate& rate) in setPlaybackSettings() argument
188 data.writeFloat(rate.mSpeed); in setPlaybackSettings()
189 data.writeFloat(rate.mPitch); in setPlaybackSettings()
190 data.writeInt32((int32_t)rate.mFallbackMode); in setPlaybackSettings()
191 data.writeInt32((int32_t)rate.mStretchMode); in setPlaybackSettings()
196 status_t getPlaybackSettings(AudioPlaybackRate* rate /* nonnull */) in getPlaybackSettings() argument
203 *rate = AUDIO_PLAYBACK_RATE_DEFAULT; in getPlaybackSettings()
204 rate->mSpeed = reply.readFloat(); in getPlaybackSettings()
205 rate->mPitch = reply.readFloat(); in getPlaybackSettings()
206 rate->mFallbackMode = (AudioTimestretchFallbackMode)reply.readInt32(); in getPlaybackSettings()
[all …]
Dmediaplayer.cpp388 status_t MediaPlayer::setPlaybackSettings(const AudioPlaybackRate& rate) in setPlaybackSettings() argument
391 rate.mSpeed, rate.mPitch, rate.mFallbackMode, rate.mStretchMode); in setPlaybackSettings()
394 if (rate.mSpeed < 0.f || rate.mPitch < 0.f) { in setPlaybackSettings()
400 if (rate.mSpeed != 0.f && !(mCurrentState & MEDIA_PLAYER_STARTED) in setPlaybackSettings()
408 status_t err = mPlayer->setPlaybackSettings(rate); in setPlaybackSettings()
410 if (rate.mSpeed == 0.f && mCurrentState == MEDIA_PLAYER_STARTED) { in setPlaybackSettings()
412 } else if (rate.mSpeed != 0.f in setPlaybackSettings()
421 status_t MediaPlayer::getPlaybackSettings(AudioPlaybackRate* rate /* nonnull */) in getPlaybackSettings() argument
425 return mPlayer->getPlaybackSettings(rate); in getPlaybackSettings()
/frameworks/base/docs/html/ndk/guides/audio/
Dinput-latency.jd77 even when both sides use the same sample rate. Your application should buffer the data with
80 <li>Don't assume that the actual sample rate exactly matches the nominal sample rate. For
81 example, if the nominal sample rate is 48,000 Hz, it is normal for the audio clock to advance
82 at a slightly different rate than the operating system {@code CLOCK_MONOTONIC}. This is because
85 <li>Don't assume that the actual playback sample rate exactly matches the actual capture sample
86 rate, especially if the endpoints are on separate paths. For example, if you are capturing from
87 the on-device microphone at 48,000 Hz nominal sample rate, and playing on USB audio
88 at 48,000 Hz nominal sample rate, the actual sample rates are likely to be slightly different
92 <p>A consequence of potentially independent audio clocks is the need for asynchronous sample rate
93 conversion. A simple (though not ideal for audio quality) technique for asynchronous sample rate
/frameworks/base/media/jni/soundpool/
DSoundPool.cpp250 int priority, int loop, float rate) in play() argument
253 sampleID, leftVolume, rightVolume, priority, loop, rate); in play()
283 channel->play(sample, channelID, leftVolume, rightVolume, priority, loop, rate); in play()
422 void SoundPool::setRate(int channelID, float rate) in setRate() argument
424 ALOGV("setRate(%d, %f)", channelID, rate); in setRate()
428 channel->setRate(rate); in setRate()
504 uint32_t *rate, int *numChannels, audio_format_t *audioFormat, in decode() argument
637 if (!AMediaFormat_getInt32(format, AMEDIAFORMAT_KEY_SAMPLE_RATE, (int32_t*) rate) || in decode()
706 float rightVolume, int priority, int loop, float rate) in play() argument
718 priority, loop, rate); in play()
[all …]
DSoundPool.h92 float rightVolume, int priority, int loop, float rate);
99 float rate() { return mRate; } in rate() function
121 int priority, int loop, float rate);
130 void setRate(float rate);
169 int loop, float rate);
178 void setRate(int channelID, float rate);
/frameworks/base/media/jni/
Dandroid_media_MediaSync.cpp81 status_t JMediaSync::setPlaybackParams(const AudioPlaybackRate& rate) { in setPlaybackParams() argument
82 return mSync->setPlaybackSettings(rate); in setPlaybackParams()
85 void JMediaSync::getPlaybackParams(AudioPlaybackRate* rate /* nonnull */) { in getPlaybackParams() argument
86 mSync->getPlaybackSettings(rate); in getPlaybackParams()
97 status_t JMediaSync::setVideoFrameRateHint(float rate) { in setVideoFrameRateHint() argument
98 return mSync->setVideoFrameRateHint(rate); in setVideoFrameRateHint()
331 AudioPlaybackRate rate; in android_media_MediaSync_setPlaybackParams() local
332 sync->getPlaybackParams(&rate); in android_media_MediaSync_setPlaybackParams()
335 rate.mSpeed = pbs.audioRate.mSpeed; in android_media_MediaSync_setPlaybackParams()
339 rate.mPitch = pbs.audioRate.mPitch; in android_media_MediaSync_setPlaybackParams()
[all …]
Dandroid_media_MediaSync.h45 status_t setPlaybackParams(const AudioPlaybackRate& rate);
46 void getPlaybackParams(AudioPlaybackRate* rate /* nonnull */);
49 status_t setVideoFrameRateHint(float rate);
/frameworks/av/include/media/stagefright/
DMediaSync.h111 status_t setVideoFrameRateHint(float rate);
125 status_t setPlaybackSettings(const AudioPlaybackRate &rate);
128 void getPlaybackSettings(AudioPlaybackRate *rate /* nonnull */);
275 void updatePlaybackRate_l(float rate);
281 status_t setPlaybackSettings_l(const AudioPlaybackRate &rate);
/frameworks/base/services/core/java/com/android/server/display/
DRampAnimator.java60 public boolean animateTo(int target, int rate) { in animateTo() argument
62 if (mFirstTime || rate <= 0) { in animateTo()
89 || rate > mRate in animateTo()
92 mRate = rate; in animateTo()
/frameworks/av/media/libmediaplayerservice/nuplayer/
DNuPlayer.cpp341 status_t NuPlayer::setPlaybackSettings(const AudioPlaybackRate &rate) { in setPlaybackSettings() argument
344 if ((rate.mSpeed != 0.f && rate.mSpeed < AUDIO_TIMESTRETCH_SPEED_MIN) in setPlaybackSettings()
345 || rate.mSpeed > AUDIO_TIMESTRETCH_SPEED_MAX in setPlaybackSettings()
346 || rate.mPitch < AUDIO_TIMESTRETCH_SPEED_MIN in setPlaybackSettings()
347 || rate.mPitch > AUDIO_TIMESTRETCH_SPEED_MAX) { in setPlaybackSettings()
351 writeToAMessage(msg, rate); in setPlaybackSettings()
360 status_t NuPlayer::getPlaybackSettings(AudioPlaybackRate *rate /* nonnull */) { in getPlaybackSettings() argument
367 readFromAMessage(response, rate); in getPlaybackSettings()
733 AudioPlaybackRate rate /* sanitized */; in onMessageReceived() local
734 readFromAMessage(msg, &rate); in onMessageReceived()
[all …]
DNuPlayerRenderer.cpp168 status_t NuPlayer::Renderer::setPlaybackSettings(const AudioPlaybackRate &rate) { in setPlaybackSettings() argument
170 writeToAMessage(msg, rate); in setPlaybackSettings()
179 status_t NuPlayer::Renderer::onConfigPlayback(const AudioPlaybackRate &rate /* sanitized */) { in onConfigPlayback() argument
180 if (rate.mSpeed == 0.f) { in onConfigPlayback()
185 AudioPlaybackRate newRate = rate; in onConfigPlayback()
192 status_t err = mAudioSink->setPlaybackRate(rate); in onConfigPlayback()
197 mPlaybackSettings = rate; in onConfigPlayback()
198 mPlaybackRate = rate.mSpeed; in onConfigPlayback()
203 status_t NuPlayer::Renderer::getPlaybackSettings(AudioPlaybackRate *rate /* nonnull */) { in getPlaybackSettings() argument
210 readFromAMessage(response, rate); in getPlaybackSettings()
[all …]
/frameworks/base/core/java/android/hardware/
DLegacySensorManager.java89 public boolean registerListener(SensorListener listener, int sensors, int rate) { in registerListener() argument
95 Sensor.TYPE_ACCELEROMETER, listener, sensors, rate) || result; in registerListener()
97 Sensor.TYPE_MAGNETIC_FIELD, listener, sensors, rate) || result; in registerListener()
99 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result; in registerListener()
101 Sensor.TYPE_ORIENTATION, listener, sensors, rate) || result; in registerListener()
103 Sensor.TYPE_TEMPERATURE, listener, sensors, rate) || result; in registerListener()
108 SensorListener listener, int sensors, int rate) { in registerLegacyListener() argument
134 result = mSensorManager.registerListener(legacyListener, sensor, rate); in registerLegacyListener()
/frameworks/av/include/media/
DMediaPlayerInterface.h141 virtual status_t setPlaybackRate(const AudioPlaybackRate& rate) = 0;
142 virtual status_t getPlaybackRate(AudioPlaybackRate* rate /* nonnull */) = 0;
183 virtual status_t setPlaybackSettings(const AudioPlaybackRate& rate) { in setPlaybackSettings() argument
185 if (!isAudioPlaybackRateEqual(rate, AUDIO_PLAYBACK_RATE_DEFAULT)) { in setPlaybackSettings()
190 virtual status_t getPlaybackSettings(AudioPlaybackRate* rate /* nonnull */) { in getPlaybackSettings() argument
191 *rate = AUDIO_PLAYBACK_RATE_DEFAULT; in getPlaybackSettings()
/frameworks/base/media/java/android/media/
DMediaTimestamp.java73 MediaTimestamp(long mediaUs, long systemNs, float rate) { in MediaTimestamp() argument
76 clockRate = rate; in MediaTimestamp()
/frameworks/base/media/tests/audiotests/
Dshared_mem_test.cpp77 long rate = 44100; in Test01() local
84 f0 = pow(2., 32.) * freq / (float)rate; in Test01()
99 rate, in Test01()

1234567