From 7e408a366793021394a8e4998dc97fa46ffa6e1c Mon Sep 17 00:00:00 2001 From: VaDiM Date: Fri, 12 Apr 2024 21:48:24 +0300 Subject: [PATCH] [GUI] Fix displayed info for non-fmod audio clips from Unity <5 --- AssetStudioGUI/AssetStudioGUIForm.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/AssetStudioGUI/AssetStudioGUIForm.cs b/AssetStudioGUI/AssetStudioGUIForm.cs index 4dc8d3e..e8cb693 100644 --- a/AssetStudioGUI/AssetStudioGUIForm.cs +++ b/AssetStudioGUI/AssetStudioGUIForm.cs @@ -1055,11 +1055,14 @@ namespace AssetStudioGUI 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}"; + if (m_AudioClip.version >= 5) + { + assetItem.InfoText += + $"\nLength: {m_AudioClip.m_Length:0.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; }