TSharedPtr<ISoundFile> FUnrealAudioModule::ImportSound(const FSoundFileImportSettings& ImportSettings) { TSharedPtr<ISoundFile> ImportedSoundFile = TSharedPtr<ISoundFile>(new FSoundFile()); // Make an auto-deleting task to perform the import work in the background task thread pool FAutoDeleteAsyncTask<FAsyncSoundFileImportTask>* Task = new FAutoDeleteAsyncTask<FAsyncSoundFileImportTask>(this, ImportSettings, ImportedSoundFile); Task->StartBackgroundTask(); return ImportedSoundFile; }
void FUnrealAudioModule::ConvertSound(const FString& InputFilePath, const FString& OutputFilePath) { // Make an auto-deleting task to perform the sound file loading work in the background task thread pool FAutoDeleteAsyncTask<FAsyncSoundFileConvertTask>* Task = new FAutoDeleteAsyncTask<FAsyncSoundFileConvertTask>(this, &InputFilePath, &OutputFilePath, &DefaultConvertFormat); Task->StartBackgroundTask(); }
void FUnrealAudioModule::ExportSound(TSharedPtr<ISoundFileData> SoundFileData, const FString& ExportPath) { // Make an auto-deleting task to perform the import work in the background task thread pool FAutoDeleteAsyncTask<FAsyncSoundFileExportTask>* Task = new FAutoDeleteAsyncTask<FAsyncSoundFileExportTask>(this, SoundFileData, &ExportPath); Task->StartBackgroundTask(); }