diff --git a/CUE4Parse b/CUE4Parse index 4514f1ac..d512c176 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 4514f1acd51c9d3458eb0eda0abf37bb77453d2b +Subproject commit d512c176b722af7345fd4240ffaeed05a5f49013 diff --git a/FModel/MainWindow.xaml.cs b/FModel/MainWindow.xaml.cs index e8f32c5d..cf200e84 100644 --- a/FModel/MainWindow.xaml.cs +++ b/FModel/MainWindow.xaml.cs @@ -85,7 +85,7 @@ public partial class MainWindow #if DEBUG // await _threadWorkerView.Begin(cancellationToken => // _applicationView.CUE4Parse.Extract(cancellationToken, - // _applicationView.CUE4Parse.Provider["FortniteGame/Plugins/GameFeatures/BRMapCh6/Content/Maps/Hermes_Terrain/_Generated_/A6Z7VUFLP2917NVTLT6WZFOVC.umap"])); + // _applicationView.CUE4Parse.Provider["Marvel/Content/Marvel/Wwise/Assets/Events/Music/music_new/event/Entry.uasset"])); #endif } diff --git a/FModel/ViewModels/AudioPlayerViewModel.cs b/FModel/ViewModels/AudioPlayerViewModel.cs index 3f4ad78d..27251163 100644 --- a/FModel/ViewModels/AudioPlayerViewModel.cs +++ b/FModel/ViewModels/AudioPlayerViewModel.cs @@ -294,6 +294,8 @@ public class AudioPlayerViewModel : ViewModel, ISource, IDisposable { Save(a, true); } + + FLogger.Append(ELog.Information, () => FLogger.Text($"Successfully saved {_audioFiles.Count} audio files", Constants.WHITE, true)); }); } @@ -329,16 +331,22 @@ public class AudioPlayerViewModel : ViewModel, ISource, IDisposable if (File.Exists(path)) { Log.Information("{FileName} successfully saved", fileToSave.FileName); - FLogger.Append(ELog.Information, () => + if (!auto) { - FLogger.Text("Successfully saved ", Constants.WHITE); - FLogger.Link(fileToSave.FileName, path, true); - }); + FLogger.Append(ELog.Information, () => + { + FLogger.Text("Successfully saved ", Constants.WHITE); + FLogger.Link(fileToSave.FileName, path, true); + }); + } } else { Log.Error("{FileName} could not be saved", fileToSave.FileName); - FLogger.Append(ELog.Error, () => FLogger.Text($"Could not save '{fileToSave.FileName}'", Constants.WHITE, true)); + if (!auto) + { + FLogger.Append(ELog.Error, () => FLogger.Text($"Could not save '{fileToSave.FileName}'", Constants.WHITE, true)); + } } } diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index be379030..cc4bb7ce 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -835,6 +835,25 @@ public class CUE4ParseViewModel : ViewModel TabControl.SelectedTab.AddImage(sourceFile.SubstringAfterLast('/'), false, bitmap, false, updateUi); return false; } + case UAkAudioEvent when isNone && pointer.Object.Value is UAkAudioEvent { EventCookedData: { } wwiseData }: + { + foreach (var kvp in wwiseData.EventLanguageMap) + { + if (!kvp.Value.HasValue) continue; + + foreach (var media in kvp.Value.Value.Media) + { + if (!Provider.TrySaveAsset(Path.Combine("Game/WwiseAudio/", media.MediaPathName.Text), out var data)) continue; + + var namedPath = string.Concat( + Provider.ProjectName, "/Content/WwiseAudio/", + media.DebugName.Text.SubstringBeforeLast('.').Replace('\\', '/'), + " (", kvp.Key.LanguageName.Text, ")"); + SaveAndPlaySound(namedPath, media.MediaPathName.Text.SubstringAfterLast('.'), data); + } + } + return false; + } case UAkMediaAssetData when isNone: case USoundWave when isNone: { @@ -847,7 +866,7 @@ public class CUE4ParseViewModel : ViewModel return false; } - SaveAndPlaySound(Path.Combine(TabControl.SelectedTab.Entry.PathWithoutExtension).Replace('\\', '/'), audioFormat, data); + SaveAndPlaySound(TabControl.SelectedTab.Entry.PathWithoutExtension.Replace('\\', '/'), audioFormat, data); return false; } case UWorld when isNone && UserSettings.Default.PreviewWorlds: