diff --git a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs
index 0304da6..4123ce2 100644
--- a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs
+++ b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs
@@ -43,6 +43,7 @@
this.assetLoadingToolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
this.enablePreview = new System.Windows.Forms.ToolStripMenuItem();
this.displayInfo = new System.Windows.Forms.ToolStripMenuItem();
+ this.autoPlayAudioAssetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.useDumpTreeViewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.buildTreeStructureToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.customCompressionTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -266,6 +267,7 @@
this.assetLoadingToolStripSeparator,
this.enablePreview,
this.displayInfo,
+ this.autoPlayAudioAssetsToolStripMenuItem,
this.useDumpTreeViewToolStripMenuItem,
this.buildTreeStructureToolStripMenuItem,
this.customCompressionTypeToolStripMenuItem,
@@ -326,6 +328,15 @@
"t, audio bitrate, etc.";
this.displayInfo.CheckedChanged += new System.EventHandler(this.displayAssetInfo_Check);
//
+ // autoPlayAudioAssetsToolStripMenuItem
+ //
+ this.autoPlayAudioAssetsToolStripMenuItem.CheckOnClick = true;
+ this.autoPlayAudioAssetsToolStripMenuItem.Name = "autoPlayAudioAssetsToolStripMenuItem";
+ this.autoPlayAudioAssetsToolStripMenuItem.Size = new System.Drawing.Size(241, 22);
+ this.autoPlayAudioAssetsToolStripMenuItem.Text = "Autoplay audio assets";
+ this.autoPlayAudioAssetsToolStripMenuItem.ToolTipText = "Autoplay AudioClip assets when selected";
+ this.autoPlayAudioAssetsToolStripMenuItem.CheckedChanged += new System.EventHandler(this.autoPlayAudioAssetsToolStripMenuItem_CheckedChanged);
+ //
// useDumpTreeViewToolStripMenuItem
//
this.useDumpTreeViewToolStripMenuItem.CheckOnClick = true;
@@ -1751,6 +1762,7 @@
private System.Windows.Forms.ToolStripMenuItem colorThemeLightToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem colorThemeDarkToolStripMenuItem;
private System.Windows.Forms.Label FMODaudioChannelsLabel;
+ private System.Windows.Forms.ToolStripMenuItem autoPlayAudioAssetsToolStripMenuItem;
}
}
diff --git a/AssetStudioGUI/AssetStudioGUIForm.cs b/AssetStudioGUI/AssetStudioGUIForm.cs
index 9033cda..baf6207 100644
--- a/AssetStudioGUI/AssetStudioGUIForm.cs
+++ b/AssetStudioGUI/AssetStudioGUIForm.cs
@@ -143,6 +143,7 @@ namespace AssetStudioGUI
buildTreeStructureToolStripMenuItem.Checked = Properties.Settings.Default.buildTreeStructure;
useAssetLoadingViaTypetreeToolStripMenuItem.Checked = Properties.Settings.Default.useTypetreeLoading;
useDumpTreeViewToolStripMenuItem.Checked = Properties.Settings.Default.useDumpTreeView;
+ autoPlayAudioAssetsToolStripMenuItem.Checked = Properties.Settings.Default.autoplayAudio;
FMODinit();
listSearchFilterMode.SelectedIndex = 0;
@@ -1159,10 +1160,12 @@ namespace AssetStudioGUI
assetItem.InfoText += $"\nLoop Start: {(FMODloopstartms / 1000 / 60):00}:{(FMODloopstartms / 1000 % 60):00}.{(FMODloopstartms / 10 % 100):00}";
assetItem.InfoText += $"\nLoop End: {(FMODloopendms / 1000 / 60):00}:{(FMODloopendms / 1000 % 60):00}.{(FMODloopendms / 10 % 100):00}";
}
-
+
+ var paused = !autoPlayAudioAssetsToolStripMenuItem.Checked;
_ = system.getMasterChannelGroup(out var channelGroup);
- result = system.playSound(sound, channelGroup, true, out channel);
+ result = system.playSound(sound, channelGroup, paused, out channel);
if (ERRCHECK(result)) return;
+ if (!paused) { timer.Start(); }
FMODpanel.Visible = true;
@@ -2573,6 +2576,12 @@ namespace AssetStudioGUI
}
}
+ private void autoPlayAudioAssetsToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.autoplayAudio = autoPlayAudioAssetsToolStripMenuItem.Checked;
+ Properties.Settings.Default.Save();
+ }
+
#region FMOD
private void FMODinit()
{
diff --git a/AssetStudioGUI/Properties/Settings.Designer.cs b/AssetStudioGUI/Properties/Settings.Designer.cs
index 8be7e78..a168198 100644
--- a/AssetStudioGUI/Properties/Settings.Designer.cs
+++ b/AssetStudioGUI/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace AssetStudioGUI.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.12.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -442,5 +442,17 @@ namespace AssetStudioGUI.Properties {
this["useDumpTreeView"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool autoplayAudio {
+ get {
+ return ((bool)(this["autoplayAudio"]));
+ }
+ set {
+ this["autoplayAudio"] = value;
+ }
+ }
}
}
diff --git a/AssetStudioGUI/Properties/Settings.settings b/AssetStudioGUI/Properties/Settings.settings
index b32f490..69111a0 100644
--- a/AssetStudioGUI/Properties/Settings.settings
+++ b/AssetStudioGUI/Properties/Settings.settings
@@ -107,5 +107,8 @@
False
+
+ False
+
\ No newline at end of file