MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / LoadFile

Method LoadFile

Source/SeaOfGrain.cpp:315–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void SeaOfGrain::LoadFile()
316{
317 using namespace juce;
318 auto file_pattern = TheSynth->GetAudioFormatManager().getWildcardForAllFormats();
319 if (File::areFileNamesCaseSensitive())
320 file_pattern += ";" + file_pattern.toUpperCase();
321 FileChooser chooser("Load sample", File(ofToSamplePath("")),
322 file_pattern, true, false, TheSynth->GetFileChooserParent());
323 if (chooser.browseForFileToOpen())
324 {
325 auto file = chooser.getResult();
326
327 std::vector<std::string> fileArray;
328 fileArray.push_back(file.getFullPathName().toStdString());
329 FilesDropped(fileArray, 0, 0);
330 }
331}
332
333void SeaOfGrain::ButtonClicked(ClickButton* button, double time)
334{

Callers

nothing calls this directly

Calls 2

ofToSamplePathFunction · 0.85
GetFileChooserParentMethod · 0.80

Tested by

no test coverage detected