| 742 | } |
| 743 | |
| 744 | void SamplePlayer::LoadFile() |
| 745 | { |
| 746 | auto file_pattern = TheSynth->GetAudioFormatManager().getWildcardForAllFormats(); |
| 747 | if (File::areFileNamesCaseSensitive()) |
| 748 | file_pattern += ";" + file_pattern.toUpperCase(); |
| 749 | FileChooser chooser("Load sample", File(ofToSamplePath("")), |
| 750 | file_pattern, true, false, TheSynth->GetFileChooserParent()); |
| 751 | if (chooser.browseForFileToOpen()) |
| 752 | { |
| 753 | auto file = chooser.getResult(); |
| 754 | |
| 755 | Sample* sample = new Sample(); |
| 756 | if (file.existsAsFile()) |
| 757 | sample->Read(file.getFullPathName().toStdString().c_str()); |
| 758 | UpdateSample(sample, true); |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | void SamplePlayer::SaveFile() |
| 763 | { |
nothing calls this directly
no test coverage detected