mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-18 03:24:15 -04:00
Fix displayed info for non-fmod audio clips
This commit is contained in:
@ -952,8 +952,8 @@ namespace AssetStudioGUI
|
||||
{
|
||||
switch (m_AudioClip.m_Type)
|
||||
{
|
||||
case FMODSoundType.ACC:
|
||||
assetItem.InfoText += "Acc";
|
||||
case FMODSoundType.AAC:
|
||||
assetItem.InfoText += "AAC";
|
||||
break;
|
||||
case FMODSoundType.AIFF:
|
||||
assetItem.InfoText += "AIFF";
|
||||
@ -1036,6 +1036,18 @@ namespace AssetStudioGUI
|
||||
var m_AudioData = m_AudioClip.m_AudioData.GetData();
|
||||
if (m_AudioData == null || m_AudioData.Length == 0)
|
||||
return;
|
||||
|
||||
if (!m_AudioClip.IsConvertSupport())
|
||||
{
|
||||
assetItem.InfoText +=
|
||||
$"\nLength: {m_AudioClip.m_Length:.0##}\n" +
|
||||
$"Channel count: {m_AudioClip.m_Channels}\n" +
|
||||
$"Sample rate: {m_AudioClip.m_Frequency}\n" +
|
||||
$"Bit depth: {m_AudioClip.m_BitsPerSample}";
|
||||
StatusStripUpdate("Preview is not available for non-fmod sounds. Try to export instead.");
|
||||
return;
|
||||
}
|
||||
|
||||
var exinfo = new FMOD.CREATESOUNDEXINFO();
|
||||
|
||||
exinfo.cbsize = Marshal.SizeOf(exinfo);
|
||||
@ -2298,7 +2310,7 @@ namespace AssetStudioGUI
|
||||
ERRCHECK(result);
|
||||
if (version < FMOD.VERSION.number)
|
||||
{
|
||||
Logger.Error($"Error! You are using an old version of FMOD {version:X}. This program requires {FMOD.VERSION.number:X}.");
|
||||
Logger.Error($"Error! You are using an old version of FMOD {version:X}. This program requires {FMOD.VERSION.number:X}.");
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
|
4
AssetStudioGUI/ExportOptions.Designer.cs
generated
4
AssetStudioGUI/ExportOptions.Designer.cs
generated
@ -214,9 +214,9 @@
|
||||
this.convertAudio.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.convertAudio.Location = new System.Drawing.Point(6, 173);
|
||||
this.convertAudio.Name = "convertAudio";
|
||||
this.convertAudio.Size = new System.Drawing.Size(179, 17);
|
||||
this.convertAudio.Size = new System.Drawing.Size(213, 17);
|
||||
this.convertAudio.TabIndex = 7;
|
||||
this.convertAudio.Text = "Convert AudioClip to WAV(PCM)";
|
||||
this.convertAudio.Text = "Convert FMOD AudioClip to WAV(PCM)";
|
||||
this.convertAudio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// panel1
|
||||
|
Reference in New Issue
Block a user