Lines Matching refs:VOLUME
174 // Integer volume.
175 // Currently integer volume is kept for the legacy integer mixer.
177 t->volume[0] = UNITY_GAIN_INT;
178 t->volume[1] = UNITY_GAIN_INT;
187 // Floating point volume.
479 /* Sets the volume ramp variables for the AudioMixer.
481 * The volume ramp variables are used to transition from the previous
482 * volume to the set volume. ramp controls the duration of the transition.
486 * FIXME: 1) Volume ramp is enabled only if there is a nonzero integer increment
487 * even if there is a nonzero floating point increment (in that case, the volume
490 * FIXME: 2) Integer volume variables are used for Legacy mixing and should be removed
493 * @param newVolume set volume target in floating point [0.0, 1.0].
494 * @param ramp number of frames to increment over. if ramp is 0, the volume
496 * @param pIntSetVolume pointer to the U4.12 integer target volume, set on return.
497 * @param pIntPrevVolume pointer to the U4.28 integer previous volume, set on return.
499 * @param pSetVolume pointer to the float target volume, set on return.
500 * @param pPrevVolume pointer to the float previous volume, set on return.
502 * @return true if the volume has changed, false if volume is same.
507 // check floating point volume to see if it is identical to the previously
508 // set volume.
511 // If the resulting volume is too small to ramp, it is a direct set of the volume.
524 break; // zero volume is fine
526 // Infinite volume could be handled consistently since
528 // but we limit volume to unity gain float.
536 // that integer has. However, we limit the volume to
538 // TODO: Revisit the volume limitation and perhaps parameterize.
546 // set floating point volume ramp
560 // it may be possible that the ramped volume may be subnormal or
568 // compute and check integer volume, no need to check negative values
569 // The integer volume is limited to "unity_gain" to avoid wrapping and other
576 // set integer volume ramp
578 // integer volume is U4.12 (to use 16 bit multiplies), but ramping uses U4.28.
699 case VOLUME:
707 target == VOLUME ? "VOLUME" : "RAMP_VOLUME", track.auxLevel);
715 &track.volume[param - VOLUME0], &track.prevVolume[param - VOLUME0],
719 ALOGV("setParameter(%s, VOLUME%d: %04x)",
720 target == VOLUME ? "VOLUME" : "RAMP_VOLUME", param - VOLUME0,
721 track.volume[param - VOLUME0]);
725 LOG_ALWAYS_FATAL("setParameter volume: bad param %d", param);
818 /* Checks to see if the volume ramp has completed and clears the increment
824 * and can be removed once the integer volume is removed.
838 prevVolume[i] = volume[i] << 16;
848 if (((volumeInc[i]>0) && (((prevVolume[i]+volumeInc[i])>>16) >= volume[i])) ||
849 ((volumeInc[i]<0) && (((prevVolume[i]+volumeInc[i])>>16) <= volume[i]))) {
851 prevVolume[i] = volume[i] << 16;
855 //ALOGV("ramp: %d %d %d", volume[i] << 16, prevVolume[i], volumeInc[i]);
1044 // Now that the volume ramp has been done, set optimal state and
1123 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1126 // ramp volume
1160 const int16_t vl = t->volume[0];
1161 const int16_t vr = t->volume[1];
1204 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1248 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1295 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1315 const int16_t vl = t->volume[0];
1316 const int16_t vr = t->volume[1];
1336 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1353 const int16_t vl = t->volume[0];
1354 const int16_t vr = t->volume[1];
1603 const int16_t vl = t.volume[0];
1604 const int16_t vr = t.volume[1];
1618 " %p track %d, channels %d, needs %08x, volume %08x vfl %f vfr %f",
1639 // volume is boosted, so we might need to clamp even though
1768 * USEFLOATVOL (set to true if float volume is used)
1769 * ADJUSTVOL (set to true if volume ramp parameters needs adjustment afterwards)
1799 t->volume, t->auxLevel);
1805 * aux buffer, volume ramp, or resampling.
1887 } else { // constant volume gain