Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfare committed Apr 10, 2020
1 parent da98a0c commit b10d03d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion AssetStudioGUI/Exporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static bool ExportAudioClip(AssetItem item, string exportPath)
if (m_AudioData == null || m_AudioData.Length == 0)
return false;
var converter = new AudioClipConverter(m_AudioClip);
if (Properties.Settings.Default.convertAudio && converter.IsFMODSupport)
if (Properties.Settings.Default.convertAudio && converter.IsSupport)
{
var exportFullName = exportPath + item.Text + ".wav";
if (ExportFileExists(exportFullName))
Expand Down
15 changes: 5 additions & 10 deletions AssetStudioUtility/AudioClipConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,24 @@ public string GetExtensionName()
case AudioCompressionFormat.MP3:
return ".fsb";
case AudioCompressionFormat.VAG:
return ".vag";
return ".fsb";
case AudioCompressionFormat.HEVAG:
return ".vag";
return ".fsb";
case AudioCompressionFormat.XMA:
return ".wav";
return ".fsb";
case AudioCompressionFormat.AAC:
return ".m4a";
case AudioCompressionFormat.GCADPCM:
return ".fsb";
case AudioCompressionFormat.ATRAC9:
return ".at9";
return ".fsb";
}
}

return ".AudioClip";
}

public bool IsFMODSupport
public bool IsSupport
{
get
{
Expand All @@ -147,7 +147,6 @@ public bool IsFMODSupport
case AudioType.S3M:
case AudioType.XM:
case AudioType.XMA:
case AudioType.VAG:
case AudioType.AUDIOQUEUE:
return true;
default:
Expand All @@ -162,11 +161,7 @@ public bool IsFMODSupport
case AudioCompressionFormat.Vorbis:
case AudioCompressionFormat.ADPCM:
case AudioCompressionFormat.MP3:
case AudioCompressionFormat.VAG:
case AudioCompressionFormat.HEVAG:
case AudioCompressionFormat.XMA:
case AudioCompressionFormat.GCADPCM:
case AudioCompressionFormat.ATRAC9:
return true;
default:
return false;
Expand Down

0 comments on commit b10d03d

Please sign in to comment.