Lines Matching refs:volume

173         // Integer volume.
174 // Currently integer volume is kept for the legacy integer mixer.
176 t->volume[0] = UNITY_GAIN_INT;
177 t->volume[1] = UNITY_GAIN_INT;
186 // Floating point volume.
484 /* Sets the volume ramp variables for the AudioMixer.
486 * The volume ramp variables are used to transition from the previous
487 * volume to the set volume. ramp controls the duration of the transition.
492 * even if there is a nonzero floating point increment (in that case, the volume
495 * FIXME: 2) Integer volume variables are used for Legacy mixing and should be removed
498 * @param newVolume set volume target in floating point [0.0, 1.0].
499 * @param ramp number of frames to increment over. if ramp is 0, the volume
501 * @param pIntSetVolume pointer to the U4.12 integer target volume, set on return.
502 * @param pIntPrevVolume pointer to the U4.28 integer previous volume, set on return.
504 * @param pSetVolume pointer to the float target volume, set on return.
505 * @param pPrevVolume pointer to the float previous volume, set on return.
507 * @return true if the volume has changed, false if volume is same.
512 // check floating point volume to see if it is identical to the previously
513 // set volume.
516 // If the resulting volume is too small to ramp, it is a direct set of the volume.
529 break; // zero volume is fine
531 // Infinite volume could be handled consistently since
533 // but we limit volume to unity gain float.
541 // that integer has. However, we limit the volume to
543 // TODO: Revisit the volume limitation and perhaps parameterize.
551 // set floating point volume ramp
565 // it may be possible that the ramped volume may be subnormal or
573 // compute and check integer volume, no need to check negative values
574 // The integer volume is limited to "unity_gain" to avoid wrapping and other
581 // set integer volume ramp
583 // integer volume is U4.12 (to use 16 bit multiplies), but ramping uses U4.28.
720 &track.volume[param - VOLUME0], &track.prevVolume[param - VOLUME0],
726 track.volume[param - VOLUME0]);
730 LOG_ALWAYS_FATAL("setParameter volume: bad param %d", param);
823 /* Checks to see if the volume ramp has completed and clears the increment
829 * and can be removed once the integer volume is removed.
843 prevVolume[i] = volume[i] << 16;
853 if (((volumeInc[i]>0) && (((prevVolume[i]+volumeInc[i])>>16) >= volume[i])) ||
854 ((volumeInc[i]<0) && (((prevVolume[i]+volumeInc[i])>>16) <= volume[i]))) {
856 prevVolume[i] = volume[i] << 16;
860 //ALOGV("ramp: %d %d %d", volume[i] << 16, prevVolume[i], volumeInc[i]);
1049 // Now that the volume ramp has been done, set optimal state and
1128 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1131 // ramp volume
1165 const int16_t vl = t->volume[0];
1166 const int16_t vr = t->volume[1];
1209 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1253 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1300 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1320 const int16_t vl = t->volume[0];
1321 const int16_t vr = t->volume[1];
1341 // t, vlInc/65536.0f, vl/65536.0f, t->volume[0],
1358 const int16_t vl = t->volume[0];
1359 const int16_t vr = t->volume[1];
1608 const int16_t vl = t.volume[0];
1609 const int16_t vr = t.volume[1];
1628 " %p track %d, channels %d, needs %08x, volume %08x vfl %f vfr %f",
1649 // volume is boosted, so we might need to clamp even though
1778 * USEFLOATVOL (set to true if float volume is used)
1779 * ADJUSTVOL (set to true if volume ramp parameters needs adjustment afterwards)
1809 t->volume, t->auxLevel);
1815 * aux buffer, volume ramp, or resampling.
1897 } else { // constant volume gain