| 661 | } |
| 662 | |
| 663 | void NeuralPiAudioProcessorEditor::irSelectChanged() |
| 664 | { |
| 665 | const int selectedFileIndex = irSelect.getSelectedItemIndex(); |
| 666 | File selectedFile = processor.userAppDataDirectory_irs.getFullPathName() + "/" + irSelect.getText() + ".wav"; |
| 667 | if (selectedFileIndex >= 0 && selectedFileIndex < processor.irFiles.size()) { |
| 668 | //processor.loadIR(processor.irFiles[selectedFileIndex]); |
| 669 | processor.loadIR(selectedFile); |
| 670 | processor.current_ir_index = selectedFileIndex; |
| 671 | } |
| 672 | auto newValue = static_cast<float>(processor.current_ir_index / (processor.num_irs - 1.0)); |
| 673 | irKnob.setValue(newValue); |
| 674 | } |
| 675 | |
| 676 | void NeuralPiAudioProcessorEditor::updateToggleState(juce::Button* button, juce::String name) |
| 677 | { |