MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / valueTreePropertyChanged

Method valueTreePropertyChanged

NeuralNote/Source/SourceAudioManager.cpp:301–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void SourceAudioManager::valueTreePropertyChanged(ValueTree& treeWhosePropertyHasChanged, const Identifier& property)
302{
303 if (property == NnId::SourceAudioNativeSrPathId) {
304 auto path = treeWhosePropertyHasChanged.getProperty(property).toString();
305
306 if (path != mSourceFile.getFullPathName()) {
307 if (path.isEmpty()) {
308 clear();
309 return;
310 }
311
312 onFileDrop(File(path));
313
314 // If loading state from recorded audio, add to files to delete on clear.
315 if (mSourceFile.getParentDirectory() == mNeuralNoteDir) {
316 mRecordedFileDown =
317 mNeuralNoteDir.getChildFile(mSourceFile.getFileNameWithoutExtension() + "_downsampled.wav");
318 mFilesToDelete.push_back(mSourceFile);
319 mFilesToDelete.push_back(mRecordedFileDown);
320 mDroppedFilename = "";
321 }
322 }
323 }
324}
325
326void SourceAudioManager::_deleteFilesToDelete()
327{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected