From 6d953d774d13f414ed663944e6f94319e25ac04d Mon Sep 17 00:00:00 2001 From: BM85-Hz <53278075+BM85-Hz@users.noreply.github.com> Date: Wed, 8 May 2024 22:30:50 -0700 Subject: [PATCH] simplify loop label --- AssetStudioGUI/AssetStudioGUIForm.Designer.cs | 14 -------------- AssetStudioGUI/AssetStudioGUIForm.cs | 10 ++++------ 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs index ebda9c7..ca2db88 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.Designer.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.Designer.cs @@ -122,7 +122,6 @@ this.FMODcopyright = new System.Windows.Forms.Label(); this.FMODinfoLabel = new System.Windows.Forms.Label(); this.FMODtimerLabel = new System.Windows.Forms.Label(); - this.FMODloopLabel = new System.Windows.Forms.Label(); this.FMODstatusLabel = new System.Windows.Forms.Label(); this.FMODprogressBar = new System.Windows.Forms.TrackBar(); this.FMODvolumeBar = new System.Windows.Forms.TrackBar(); @@ -1021,7 +1020,6 @@ this.FMODpanel.Controls.Add(this.FMODcopyright); this.FMODpanel.Controls.Add(this.FMODinfoLabel); this.FMODpanel.Controls.Add(this.FMODtimerLabel); - this.FMODpanel.Controls.Add(this.FMODloopLabel); this.FMODpanel.Controls.Add(this.FMODstatusLabel); this.FMODpanel.Controls.Add(this.FMODprogressBar); this.FMODpanel.Controls.Add(this.FMODvolumeBar); @@ -1071,17 +1069,6 @@ this.FMODtimerLabel.TabIndex = 7; this.FMODtimerLabel.Text = "00:00.00 / 00:00.00"; // - // FMODloopLabel - // - this.FMODloopLabel.AutoSize = true; - this.FMODloopLabel.ForeColor = System.Drawing.SystemColors.HighlightText; - this.FMODloopLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.FMODloopLabel.Location = new System.Drawing.Point(4, 24); - this.FMODloopLabel.Name = "FMODloopLabel"; - this.FMODloopLabel.Size = new System.Drawing.Size(102, 13); - this.FMODloopLabel.TabIndex = 10; - this.FMODloopLabel.Text = "00:00.00 / 00:00.00"; - // // FMODstatusLabel // this.FMODstatusLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; @@ -1522,7 +1509,6 @@ private System.Windows.Forms.TrackBar FMODprogressBar; private System.Windows.Forms.Label FMODstatusLabel; private System.Windows.Forms.Label FMODtimerLabel; - private System.Windows.Forms.Label FMODloopLabel; private System.Windows.Forms.Label FMODinfoLabel; private System.Windows.Forms.Timer timer; private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; diff --git a/AssetStudioGUI/AssetStudioGUIForm.cs b/AssetStudioGUI/AssetStudioGUIForm.cs index 9aa530b..4b588c2 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.cs @@ -1112,8 +1112,10 @@ namespace AssetStudioGUI result = sound.getLength(out FMODlenms, FMOD.TIMEUNIT.MS); if (ERRCHECK(result)) return; - result = sound.getLoopPoints(out FMODloopstartms, FMOD.TIMEUNIT.MS, out FMODloopendms, FMOD.TIMEUNIT.MS); - if (ERRCHECK(result)) return; + sound.getLoopPoints(out FMODloopstartms, FMOD.TIMEUNIT.MS, out FMODloopendms, FMOD.TIMEUNIT.MS); + + 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}"; _ = system.getMasterChannelGroup(out var channelGroup); result = system.playSound(sound, channelGroup, true, out channel); @@ -1126,8 +1128,6 @@ namespace AssetStudioGUI FMODinfoLabel.Text = frequency + " Hz"; FMODtimerLabel.Text = $"00:00.00 / {(FMODlenms / 1000 / 60):00}:{(FMODlenms / 1000 % 60):00}.{(FMODlenms / 10 % 100):00}"; - FMODloopLabel.Text = $"Loop Start: {(FMODloopstartms / 1000 / 60):00}:{(FMODloopstartms / 1000 % 60):00}.{(FMODloopstartms / 10 % 100):00} - " + - $"Loop End: {(FMODloopendms / 1000 / 60):00}:{(FMODloopendms / 1000 % 60):00}.{(FMODloopendms / 10 % 100):00}"; } private void PreviewVideoClip(AssetItem assetItem, VideoClip m_VideoClip) @@ -2384,7 +2384,6 @@ namespace AssetStudioGUI timer.Stop(); FMODprogressBar.Value = 0; FMODtimerLabel.Text = "00:00.00 / 00:00.00"; - FMODloopLabel.Text = $"Loop Start: 00:00.00 - Loop End: 00:00.00"; FMODstatusLabel.Text = "Stopped"; FMODinfoLabel.Text = ""; @@ -2491,7 +2490,6 @@ namespace AssetStudioGUI timer.Stop(); FMODprogressBar.Value = 0; FMODtimerLabel.Text = "00:00.00 / 00:00.00"; - FMODloopLabel.Text = $"Loop Start: 00:00.00 - Loop End: 00:00.00"; FMODstatusLabel.Text = "Stopped"; FMODpauseButton.Text = "Pause"; }