mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-25 05:40:21 -04:00
added AudioClip loop point display to GUI
This commit is contained in:
parent
d886bf1c5d
commit
f0a793bd3d
14
AssetStudioGUI/AssetStudioGUIForm.Designer.cs
generated
14
AssetStudioGUI/AssetStudioGUIForm.Designer.cs
generated
@ -122,6 +122,7 @@
|
||||
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();
|
||||
@ -1020,6 +1021,7 @@
|
||||
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);
|
||||
@ -1069,6 +1071,17 @@
|
||||
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;
|
||||
@ -1509,6 +1522,7 @@
|
||||
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;
|
||||
|
@ -43,6 +43,8 @@ namespace AssetStudioGUI
|
||||
private FMOD.SoundGroup masterSoundGroup;
|
||||
private FMOD.MODE loopMode = FMOD.MODE.LOOP_OFF;
|
||||
private uint FMODlenms;
|
||||
private uint FMODloopstartms;
|
||||
private uint FMODloopendms;
|
||||
private float FMODVolume = 0.8f;
|
||||
|
||||
#region SpriteControl
|
||||
@ -1110,6 +1112,9 @@ 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;
|
||||
|
||||
_ = system.getMasterChannelGroup(out var channelGroup);
|
||||
result = system.playSound(sound, channelGroup, true, out channel);
|
||||
if (ERRCHECK(result)) return;
|
||||
@ -1121,6 +1126,8 @@ 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)
|
||||
@ -2377,6 +2384,7 @@ 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 = "";
|
||||
|
||||
@ -2483,6 +2491,7 @@ 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";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user