Lines Matching refs:VolumeShaper
52 class VolumeShaper {
576 VolumeShaper( in VolumeShaper() function
577 const sp<VolumeShaper::Configuration> &configuration, in VolumeShaper()
578 const sp<VolumeShaper::Operation> &operation) in VolumeShaper()
586 && (getFlags() & VolumeShaper::Operation::FLAG_DELAY) == 0) { in VolumeShaper()
592 VolumeShaper::Operation::Flag getFlags() const { in getFlags()
594 ? VolumeShaper::Operation::FLAG_NONE : mOperation->getFlags(); in getFlags()
601 sp<VolumeShaper::State> getState() const { in getState()
606 return new VolumeShaper::State(volume, mDelayXOffset); in getState()
608 return new VolumeShaper::State(mLastVolume, mLastXOffset); in getState()
629 if ((getFlags() & VolumeShaper::Operation::FLAG_DELAY) != 0) { in getVolume()
637 & VolumeShaper::Configuration::OPTION_FLAG_CLOCK_TIME) != 0; in getVolume()
675 sp<VolumeShaper::Configuration> mConfiguration;
676 sp<VolumeShaper::Operation> mOperation;
693 S normalizedTime = (getFlags() & VolumeShaper::Operation::FLAG_REVERSE) != 0 ? in updatePosition()
712 if (getFlags() & VolumeShaper::Operation::FLAG_REVERSE) { in computeStateFromNormalizedTime()
759 , mVolumeShaperIdCounter(VolumeShaper::kSystemVolumeShapersMax) in VolumeHandler()
763 VolumeShaper::Status applyVolumeShaper( in applyVolumeShaper()
764 const sp<VolumeShaper::Configuration> &configuration, in applyVolumeShaper()
765 const sp<VolumeShaper::Operation> &operation_in) { in applyVolumeShaper()
767 sp<VolumeShaper::Operation> operation(new VolumeShaper::Operation(operation_in)); in applyVolumeShaper()
773 return VolumeShaper::Status(BAD_VALUE); in applyVolumeShaper()
777 return VolumeShaper::Status(BAD_VALUE); in applyVolumeShaper()
782 return VolumeShaper::Status(BAD_VALUE); in applyVolumeShaper()
787 case VolumeShaper::Configuration::TYPE_SCALE: { in applyVolumeShaper()
795 if ((operation->getFlags() & VolumeShaper::Operation::FLAG_JOIN) != 0) { in applyVolumeShaper()
814 & VolumeShaper::Operation::FLAG_CREATE_IF_NECESSARY) != 0) { in applyVolumeShaper()
828 if (id >= VolumeShaper::kSystemVolumeShapersMax in applyVolumeShaper()
829 && numberOfUserVolumeShapers_l() >= VolumeShaper::kUserVolumeShapersMax) { in applyVolumeShaper()
831 return VolumeShaper::Status(INVALID_OPERATION); in applyVolumeShaper()
835 mVolumeShapers.emplace_back(configuration, new VolumeShaper::Operation()); in applyVolumeShaper()
840 case VolumeShaper::Configuration::TYPE_ID: { in applyVolumeShaper()
845 return VolumeShaper::Status(INVALID_OPERATION); in applyVolumeShaper()
847 if ((operation->getFlags() & VolumeShaper::Operation::FLAG_TERMINATE) != 0) { in applyVolumeShaper()
853 & VolumeShaper::Configuration::OPTION_FLAG_CLOCK_TIME) != 0; in applyVolumeShaper()
854 if ((it->getFlags() & VolumeShaper::Operation::FLAG_REVERSE) != in applyVolumeShaper()
855 (operation->getFlags() & VolumeShaper::Operation::FLAG_REVERSE)) { in applyVolumeShaper()
857 const int64_t frameCount = clockTime ? VolumeShaper::getNowUs() : mLastFrame; in applyVolumeShaper()
875 const int64_t frameCount = clockTime ? VolumeShaper::getNowUs() : mLastFrame; in applyVolumeShaper()
879 (operation->getFlags() & VolumeShaper::Operation::FLAG_REVERSE) != 0 ? in applyVolumeShaper()
891 return VolumeShaper::Status(id); in applyVolumeShaper()
894 sp<VolumeShaper::State> getVolumeShaperState(int id) { in getVolumeShaperState()
957 void forall(const std::function<VolumeShaper::Status (const VolumeShaper &)> &lambda) { in forall()
961 VolumeShaper::Status status = lambda(shaper); in forall()
976 void setIdIfNecessary(const sp<VolumeShaper::Configuration> &configuration) { in setIdIfNecessary()
977 if (configuration->getType() == VolumeShaper::Configuration::TYPE_SCALE) { in setIdIfNecessary()
984 mVolumeShaperIdCounter = VolumeShaper::kSystemVolumeShapersMax; in setIdIfNecessary()
1000 std::list<VolumeShaper>::iterator findId_l(int32_t id) { in findId_l()
1001 std::list<VolumeShaper>::iterator it = mVolumeShapers.begin(); in findId_l()
1013 count += (shaper.mConfiguration->getId() >= VolumeShaper::kSystemVolumeShapersMax); in numberOfUserVolumeShapers_l()
1023 std::list<VolumeShaper> mVolumeShapers; // list provides stable iterators on erase