mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Wwise audio events now trigger the audio player
Some checks failed
FModel QA Builder / build (push) Has been cancelled
Some checks failed
FModel QA Builder / build (push) Has been cancelled
and rename .wem files if the event references any ofc (no .bnk support yet)
This commit is contained in:
parent
273b124840
commit
edebff0925
|
|
@ -1 +1 @@
|
|||
Subproject commit 4514f1acd51c9d3458eb0eda0abf37bb77453d2b
|
||||
Subproject commit d512c176b722af7345fd4240ffaeed05a5f49013
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user