| 769 | } |
| 770 | |
| 771 | LMemoryBlock CtrlrPanel::getModulatorValuesAsData(const String &propertyToIndexBy, const CtrlrByteEncoding byteEncoding, const int bytesPerValue, const bool useMappedValues) |
| 772 | { |
| 773 | MemoryBlock modulatorData (getNumModulators() * bytesPerValue, true); |
| 774 | uint32 truncateTo = getNumModulators() * bytesPerValue; |
| 775 | uint32 modulatorValue; |
| 776 | |
| 777 | for (int i = 0; i<getNumModulators(); i++) |
| 778 | { |
| 779 | const int index = getModulatorByIndex(i)->getProperty(propertyToIndexBy); |
| 780 | |
| 781 | if (index >= 0) |
| 782 | { |
| 783 | if (useMappedValues) |
| 784 | modulatorValue = getModulatorByIndex(i)->getValueMapped(); |
| 785 | else |
| 786 | modulatorValue = getModulatorByIndex(i)->getValueNonMapped(); |
| 787 | |
| 788 | modulatorData.setBitRange (index * (bytesPerValue * 8), bytesPerValue * 8, modulatorValue); |
| 789 | } |
| 790 | else |
| 791 | { |
| 792 | truncateTo--; |
| 793 | } |
| 794 | } |
| 795 | |
| 796 | modulatorData.setSize (truncateTo, false); |
| 797 | return (modulatorData); |
| 798 | } |
| 799 | |
| 800 | LMemoryBlock CtrlrPanel::getModulatorValuesAsData(const String &propertyToIndexBy, |
| 801 | const CtrlrByteEncoding byteEncoding, |
nothing calls this directly
no test coverage detected