| 299 | } |
| 300 | |
| 301 | void 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 | |
| 326 | void SourceAudioManager::_deleteFilesToDelete() |
| 327 | { |
nothing calls this directly
no outgoing calls
no test coverage detected