minor sound destrying change

This commit is contained in:
Respirant
2021-01-05 15:38:45 +03:00
parent c26ad4387a
commit eedf8e91b3
@@ -39,17 +39,15 @@ bool URuntimeAudioImporterLibrary::DestroySoundWave(USoundWave* ReadySoundWave)
//Delete all audio data from physical memory
ReadySoundWave->RawData.RemoveBulkData();
ReadySoundWave->RemoveAudioResource();
AsyncTask(ENamedThreads::AudioThread, [=]() {
ReadySoundWave->InvalidateCompressedData(true);
});
//Finish USoundWave destroy (complete object deletion as UObject)
if (ReadySoundWave->IsReadyForFinishDestroy()) {
ReadySoundWave->ConditionalFinishDestroy();
ReadySoundWave->FinishDestroy();
return true;
}
else {
return false;
}
ReadySoundWave->IsReadyForFinishDestroy(); //This is not needed for verification, but for the initial removal
ReadySoundWave->ConditionalFinishDestroy();
ReadySoundWave->FinishDestroy();
return true;
}
else {
return false;