Lines Matching refs:VolumeShaper
56 class VolumeShaper {
746 VolumeShaper( in VolumeShaper() function
747 const sp<VolumeShaper::Configuration> &configuration, in VolumeShaper()
748 const sp<VolumeShaper::Operation> &operation) in VolumeShaper()
756 && (getFlags() & VolumeShaper::Operation::FLAG_DELAY) == 0) { in VolumeShaper()
762 VolumeShaper::Operation::Flag getFlags() const { in getFlags()
764 ? VolumeShaper::Operation::FLAG_NONE : mOperation->getFlags(); in getFlags()
771 sp<VolumeShaper::State> getState() const { in getState()
776 return new VolumeShaper::State(volume, mDelayXOffset); in getState()
778 return new VolumeShaper::State(mLastVolume, mLastXOffset); in getState()
799 if ((getFlags() & VolumeShaper::Operation::FLAG_DELAY) != 0) { in getVolume()
807 & VolumeShaper::Configuration::OPTION_FLAG_CLOCK_TIME) != 0; in getVolume()
845 sp<VolumeShaper::Configuration> mConfiguration;
846 sp<VolumeShaper::Operation> mOperation;
863 S normalizedTime = (getFlags() & VolumeShaper::Operation::FLAG_REVERSE) != 0 ? in updatePosition()
882 if (getFlags() & VolumeShaper::Operation::FLAG_REVERSE) { in computeStateFromNormalizedTime()
929 , mVolumeShaperIdCounter(VolumeShaper::kSystemVolumeShapersMax) in VolumeHandler()
933 VolumeShaper::Status applyVolumeShaper( in applyVolumeShaper()
934 const sp<VolumeShaper::Configuration> &configuration, in applyVolumeShaper()
935 const sp<VolumeShaper::Operation> &operation_in) { in applyVolumeShaper()
937 sp<VolumeShaper::Operation> operation(new VolumeShaper::Operation(operation_in)); in applyVolumeShaper()
943 return VolumeShaper::Status(BAD_VALUE); in applyVolumeShaper()
947 return VolumeShaper::Status(BAD_VALUE); in applyVolumeShaper()
952 return VolumeShaper::Status(BAD_VALUE); in applyVolumeShaper()
957 case VolumeShaper::Configuration::TYPE_SCALE: { in applyVolumeShaper()
965 if ((operation->getFlags() & VolumeShaper::Operation::FLAG_JOIN) != 0) { in applyVolumeShaper()
984 & VolumeShaper::Operation::FLAG_CREATE_IF_NECESSARY) != 0) { in applyVolumeShaper()
998 if (id >= VolumeShaper::kSystemVolumeShapersMax in applyVolumeShaper()
999 && numberOfUserVolumeShapers_l() >= VolumeShaper::kUserVolumeShapersMax) { in applyVolumeShaper()
1001 return VolumeShaper::Status(INVALID_OPERATION); in applyVolumeShaper()
1005 mVolumeShapers.emplace_back(configuration, new VolumeShaper::Operation()); in applyVolumeShaper()
1010 case VolumeShaper::Configuration::TYPE_ID: { in applyVolumeShaper()
1015 return VolumeShaper::Status(INVALID_OPERATION); in applyVolumeShaper()
1017 if ((operation->getFlags() & VolumeShaper::Operation::FLAG_TERMINATE) != 0) { in applyVolumeShaper()
1023 & VolumeShaper::Configuration::OPTION_FLAG_CLOCK_TIME) != 0; in applyVolumeShaper()
1024 if ((it->getFlags() & VolumeShaper::Operation::FLAG_REVERSE) != in applyVolumeShaper()
1025 (operation->getFlags() & VolumeShaper::Operation::FLAG_REVERSE)) { in applyVolumeShaper()
1027 const int64_t frameCount = clockTime ? VolumeShaper::getNowUs() : mLastFrame; in applyVolumeShaper()
1045 const int64_t frameCount = clockTime ? VolumeShaper::getNowUs() : mLastFrame; in applyVolumeShaper()
1049 (operation->getFlags() & VolumeShaper::Operation::FLAG_REVERSE) != 0 ? in applyVolumeShaper()
1061 return VolumeShaper::Status(id); in applyVolumeShaper()
1064 sp<VolumeShaper::State> getVolumeShaperState(int id) { in getVolumeShaperState()
1127 void forall(const std::function<VolumeShaper::Status (const VolumeShaper &)> &lambda) { in forall()
1131 VolumeShaper::Status status = lambda(shaper); in forall()
1146 void setIdIfNecessary(const sp<VolumeShaper::Configuration> &configuration) { in setIdIfNecessary()
1147 if (configuration && configuration->getType() == VolumeShaper::Configuration::TYPE_SCALE) { in setIdIfNecessary()
1154 mVolumeShaperIdCounter = VolumeShaper::kSystemVolumeShapersMax; in setIdIfNecessary()
1170 std::list<VolumeShaper>::iterator findId_l(int32_t id) { in findId_l()
1171 std::list<VolumeShaper>::iterator it = mVolumeShapers.begin(); in findId_l()
1183 count += (shaper.mConfiguration->getId() >= VolumeShaper::kSystemVolumeShapersMax); in numberOfUserVolumeShapers_l()
1193 std::list<VolumeShaper> mVolumeShapers; // list provides stable iterators on erase