Home | History | Annotate | Download | only in libaudioprocessing

Lines Matching refs:ramp

515 /* Sets the volume ramp variables for the AudioMixer.
517 * The volume ramp variables are used to transition from the previous
518 * volume to the set volume. ramp controls the duration of the transition.
522 * FIXME: 1) Volume ramp is enabled only if there is a nonzero integer increment
530 * @param ramp number of frames to increment over. if ramp is 0, the volume
531 * should be set immediately. Currently ramp should not exceed 65535 (frames).
540 static inline bool setVolumeRampVariables(float newVolume, int32_t ramp,
547 // If the resulting volume is too small to ramp, it is a direct set of the volume.
565 // ramp = 0; break;
582 // set floating point volume ramp
583 if (ramp != 0) {
584 // when the ramp completes, *pPrevVolume is set to *pSetVolume, so there
586 ALOGD_IF(*pPrevVolume != *pSetVolume, "previous float ramp hasn't finished,"
588 const float inc = (newVolume - *pPrevVolume) / ramp; // could be inf, nan, subnormal
595 // ramp is set now.
596 // Note: if newVolume is 0, then near the end of the ramp,
601 ramp = 0; // ramp not allowed
613 // set integer volume ramp
614 if (ramp != 0) {
616 // when the ramp completes, *pIntPrevVolume is set to *pIntSetVolume << 16, so there
618 ALOGD_IF(*pIntPrevVolume != *pIntSetVolume << 16, "previous int ramp hasn't finished,"
620 const int32_t inc = ((intVolume << 16) - *pIntPrevVolume) / ramp;
625 ramp = 0; // ramp not allowed
629 // if no ramp, or ramp not allowed, then clear float and integer increments
630 if (ramp == 0) {
878 /* Checks to see if the volume ramp has completed and clears the increment
881 * FIXME: There is code to handle int/float ramp variable switchover should it not
902 //ALOGV("ramp: %f %f %f", mVolume[i], mPrevVolume[i], mVolumeInc[i]);
915 //ALOGV("ramp: %d %d %d", volume[i] << 16, prevVolume[i], volumeInc[i]);
1085 // Now that the volume ramp has been done, set optimal state and
1119 // ramp gain - resample to temp buffer and scale/mix in 2nd step
1164 // ramp volume
1233 // ramp gain
1278 // ramp gain
1323 // ramp gain
1366 // ramp gain
1752 * ADJUSTVOL (set to true if volume ramp parameters needs adjustment afterwards)
1760 const TI *in, TA *aux, bool ramp)
1763 if (ramp) {
1786 if (ramp) {
1800 * aux buffer, volume ramp, or resampling.
1801 * TODO: Update the hook selection: this can properly handle aux and ramp.
1818 const bool ramp = t->needsRamp();
1840 out, outFrames, in, aux, ramp);
1851 if (ramp) {
1903 const bool ramp = needsRamp();
1904 if (ramp || aux != NULL) {
1905 // if ramp: resample with unity gain to temp buffer and scale/mix in 2nd step.
1913 out, outFrameCount, temp, aux, ramp);