| 
64 | 64 | using Application = System.Windows.Application;  | 
65 | 65 | using FGuid = CUE4Parse.UE4.Objects.Core.Misc.FGuid;  | 
66 | 66 | using CUE4Parse.UE4.Objects.UObject.Editor;  | 
 | 67 | +using CUE4Parse.UE4.Assets.Exports.Fmod;  | 
 | 68 | +using CUE4Parse.UE4.FMod;  | 
67 | 69 | 
 
  | 
68 | 70 | 
 
  | 
69 | 71 | namespace FModel.ViewModels;  | 
@@ -130,6 +132,8 @@ public Snooper SnooperViewer  | 
130 | 132 |     public ConfigIni IoStoreOnDemand { get; }  | 
131 | 133 |     private Lazy<WwiseProvider> _wwiseProviderLazy;  | 
132 | 134 |     public WwiseProvider WwiseProvider => _wwiseProviderLazy.Value;  | 
 | 135 | +    private Lazy<FModProvider> _fmodProviderLazy;  | 
 | 136 | +    public FModProvider FmodProvider => _fmodProviderLazy?.Value;  | 
133 | 137 |     public ConcurrentBag<string> UnknownExtensions = [];  | 
134 | 138 | 
 
  | 
135 | 139 |     public CUE4ParseViewModel()  | 
@@ -283,6 +287,7 @@ await _threadWorkerView.Begin(cancellationToken =>  | 
283 | 287 | 
 
  | 
284 | 288 |             Provider.Initialize();  | 
285 | 289 |             _wwiseProviderLazy = new Lazy<WwiseProvider>(() => new WwiseProvider(Provider, UserSettings.Default.WwiseMaxBnkPrefetch));  | 
 | 290 | +            _fmodProviderLazy = new Lazy<FModProvider>(() => new FModProvider(Provider, UserSettings.Default.GameDirectory));  | 
286 | 291 |             Log.Information($"{Provider.Versions.Game} ({Provider.Versions.Platform}) | Archives: x{Provider.UnloadedVfs.Count} | AES: x{Provider.RequiredKeys.Count} | Loose Files: x{Provider.Files.Count}");  | 
287 | 292 |         });  | 
288 | 293 |     }  | 
@@ -942,6 +947,26 @@ public void ExtractAndScroll(CancellationToken cancellationToken, string fullPat  | 
942 | 947 |                 }  | 
943 | 948 |                 return false;  | 
944 | 949 |             }  | 
 | 950 | +            case UFMODEvent when isNone && pointer.Object.Value is UFMODEvent fmodEvent:  | 
 | 951 | +            {  | 
 | 952 | +                var extractedSounds = FmodProvider.ExtractEventSounds(fmodEvent);  | 
 | 953 | +                var directory = Path.GetDirectoryName(fmodEvent.Owner?.Name) ?? "/FMOD/Desktop/";  | 
 | 954 | +                foreach (var sound in extractedSounds)  | 
 | 955 | +                {  | 
 | 956 | +                    SaveAndPlaySound(Path.Combine(directory, sound.Name), sound.Extension, sound.Data);  | 
 | 957 | +                }  | 
 | 958 | +                return false;  | 
 | 959 | +            }  | 
 | 960 | +            case UFMODBank when isNone && pointer.Object.Value is UFMODBank fmodBank:  | 
 | 961 | +            {  | 
 | 962 | +                var extractedSounds = FmodProvider.ExtractBankSounds(fmodBank);  | 
 | 963 | +                var directory = Path.GetDirectoryName(fmodBank.Owner?.Name) ?? "/FMOD/Desktop/";  | 
 | 964 | +                foreach (var sound in extractedSounds)  | 
 | 965 | +                {  | 
 | 966 | +                    SaveAndPlaySound(Path.Combine(directory, sound.Name), sound.Extension, sound.Data);  | 
 | 967 | +                }  | 
 | 968 | +                return false;  | 
 | 969 | +            }  | 
945 | 970 |             case UAkMediaAssetData when isNone:  | 
946 | 971 |             case USoundWave when isNone:  | 
947 | 972 |             {  | 
 | 
0 commit comments