| 733 | } |
| 734 | |
| 735 | void DexedAudioProcessor::setCurrentProgram(int index) { |
| 736 | TRACE("setting program %d state", index); |
| 737 | |
| 738 | if ( lastStateSave + 2 > time(NULL) ) { |
| 739 | TRACE("skipping save, storage recall to close"); |
| 740 | return; |
| 741 | } |
| 742 | |
| 743 | panic(); |
| 744 | |
| 745 | index = index > 31 ? 31 : index; |
| 746 | currentCart.unpackProgram(data, index); |
| 747 | unpackOpSwitch(0x3F); |
| 748 | lfo.reset(data + 137); |
| 749 | currentProgram = index; |
| 750 | triggerAsyncUpdate(); |
| 751 | |
| 752 | // reset parameter display |
| 753 | DexedAudioProcessorEditor *editor = (DexedAudioProcessorEditor *) getActiveEditor(); |
| 754 | if ( editor == NULL ) { |
| 755 | return; |
| 756 | } |
| 757 | editor->global.setParamMessage(""); |
| 758 | |
| 759 | panic(); |
| 760 | } |
| 761 | |
| 762 | const String DexedAudioProcessor::getProgramName(int index) { |
| 763 | if (index >= 32) |
no test coverage detected