mirror of
https://github.com/storytold/RuntimeAudioImporter.git
synced 2026-10-17 00:23:02 +00:00
minor sound destrying change
This commit is contained in:
+6
-8
@@ -39,17 +39,15 @@ bool URuntimeAudioImporterLibrary::DestroySoundWave(USoundWave* ReadySoundWave)
|
|||||||
//Delete all audio data from physical memory
|
//Delete all audio data from physical memory
|
||||||
ReadySoundWave->RawData.RemoveBulkData();
|
ReadySoundWave->RawData.RemoveBulkData();
|
||||||
ReadySoundWave->RemoveAudioResource();
|
ReadySoundWave->RemoveAudioResource();
|
||||||
|
AsyncTask(ENamedThreads::AudioThread, [=]() {
|
||||||
ReadySoundWave->InvalidateCompressedData(true);
|
ReadySoundWave->InvalidateCompressedData(true);
|
||||||
|
});
|
||||||
|
|
||||||
//Finish USoundWave destroy (complete object deletion as UObject)
|
//Finish USoundWave destroy (complete object deletion as UObject)
|
||||||
if (ReadySoundWave->IsReadyForFinishDestroy()) {
|
ReadySoundWave->IsReadyForFinishDestroy(); //This is not needed for verification, but for the initial removal
|
||||||
ReadySoundWave->ConditionalFinishDestroy();
|
ReadySoundWave->ConditionalFinishDestroy();
|
||||||
ReadySoundWave->FinishDestroy();
|
ReadySoundWave->FinishDestroy();
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user