simplify loop label

This commit is contained in:
BM85-Hz 2024-05-08 22:30:50 -07:00
parent f0a793bd3d
commit 6d953d774d
2 changed files with 4 additions and 20 deletions

View File

@ -122,7 +122,6 @@
this.FMODcopyright = new System.Windows.Forms.Label(); this.FMODcopyright = new System.Windows.Forms.Label();
this.FMODinfoLabel = new System.Windows.Forms.Label(); this.FMODinfoLabel = new System.Windows.Forms.Label();
this.FMODtimerLabel = 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.FMODstatusLabel = new System.Windows.Forms.Label();
this.FMODprogressBar = new System.Windows.Forms.TrackBar(); this.FMODprogressBar = new System.Windows.Forms.TrackBar();
this.FMODvolumeBar = 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.FMODcopyright);
this.FMODpanel.Controls.Add(this.FMODinfoLabel); this.FMODpanel.Controls.Add(this.FMODinfoLabel);
this.FMODpanel.Controls.Add(this.FMODtimerLabel); this.FMODpanel.Controls.Add(this.FMODtimerLabel);
this.FMODpanel.Controls.Add(this.FMODloopLabel);
this.FMODpanel.Controls.Add(this.FMODstatusLabel); this.FMODpanel.Controls.Add(this.FMODstatusLabel);
this.FMODpanel.Controls.Add(this.FMODprogressBar); this.FMODpanel.Controls.Add(this.FMODprogressBar);
this.FMODpanel.Controls.Add(this.FMODvolumeBar); this.FMODpanel.Controls.Add(this.FMODvolumeBar);
@ -1071,17 +1069,6 @@
this.FMODtimerLabel.TabIndex = 7; this.FMODtimerLabel.TabIndex = 7;
this.FMODtimerLabel.Text = "00:00.00 / 00:00.00"; 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 // FMODstatusLabel
// //
this.FMODstatusLabel.Anchor = System.Windows.Forms.AnchorStyles.Top; this.FMODstatusLabel.Anchor = System.Windows.Forms.AnchorStyles.Top;
@ -1522,7 +1509,6 @@
private System.Windows.Forms.TrackBar FMODprogressBar; private System.Windows.Forms.TrackBar FMODprogressBar;
private System.Windows.Forms.Label FMODstatusLabel; private System.Windows.Forms.Label FMODstatusLabel;
private System.Windows.Forms.Label FMODtimerLabel; private System.Windows.Forms.Label FMODtimerLabel;
private System.Windows.Forms.Label FMODloopLabel;
private System.Windows.Forms.Label FMODinfoLabel; private System.Windows.Forms.Label FMODinfoLabel;
private System.Windows.Forms.Timer timer; private System.Windows.Forms.Timer timer;
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;

View File

@ -1112,8 +1112,10 @@ namespace AssetStudioGUI
result = sound.getLength(out FMODlenms, FMOD.TIMEUNIT.MS); result = sound.getLength(out FMODlenms, FMOD.TIMEUNIT.MS);
if (ERRCHECK(result)) return; if (ERRCHECK(result)) return;
result = sound.getLoopPoints(out FMODloopstartms, FMOD.TIMEUNIT.MS, out FMODloopendms, FMOD.TIMEUNIT.MS); sound.getLoopPoints(out FMODloopstartms, FMOD.TIMEUNIT.MS, out FMODloopendms, FMOD.TIMEUNIT.MS);
if (ERRCHECK(result)) return;
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); _ = system.getMasterChannelGroup(out var channelGroup);
result = system.playSound(sound, channelGroup, true, out channel); result = system.playSound(sound, channelGroup, true, out channel);
@ -1126,8 +1128,6 @@ namespace AssetStudioGUI
FMODinfoLabel.Text = frequency + " Hz"; FMODinfoLabel.Text = frequency + " Hz";
FMODtimerLabel.Text = $"00:00.00 / {(FMODlenms / 1000 / 60):00}:{(FMODlenms / 1000 % 60):00}.{(FMODlenms / 10 % 100):00}"; 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) private void PreviewVideoClip(AssetItem assetItem, VideoClip m_VideoClip)
@ -2384,7 +2384,6 @@ namespace AssetStudioGUI
timer.Stop(); timer.Stop();
FMODprogressBar.Value = 0; FMODprogressBar.Value = 0;
FMODtimerLabel.Text = "00:00.00 / 00:00.00"; FMODtimerLabel.Text = "00:00.00 / 00:00.00";
FMODloopLabel.Text = $"Loop Start: 00:00.00 - Loop End: 00:00.00";
FMODstatusLabel.Text = "Stopped"; FMODstatusLabel.Text = "Stopped";
FMODinfoLabel.Text = ""; FMODinfoLabel.Text = "";
@ -2491,7 +2490,6 @@ namespace AssetStudioGUI
timer.Stop(); timer.Stop();
FMODprogressBar.Value = 0; FMODprogressBar.Value = 0;
FMODtimerLabel.Text = "00:00.00 / 00:00.00"; FMODtimerLabel.Text = "00:00.00 / 00:00.00";
FMODloopLabel.Text = $"Loop Start: 00:00.00 - Loop End: 00:00.00";
FMODstatusLabel.Text = "Stopped"; FMODstatusLabel.Text = "Stopped";
FMODpauseButton.Text = "Pause"; FMODpauseButton.Text = "Pause";
} }