mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-14 11:18:47 -05:00
Some improvements to wav export for Unity 1.x - 2.5
This commit is contained in:
@@ -155,13 +155,15 @@ namespace AssetStudioGUI
|
||||
{
|
||||
if (m_AudioClip.IsLegacyRawWav())
|
||||
{
|
||||
var buffer = converter.WrapWavData(ref debugLog);
|
||||
file.Write(buffer, 0, buffer.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
file.Write(audioBuff, 0, m_AudioClip.m_AudioData.Size);
|
||||
if (m_AudioClip.m_AudioData.Endian == EndianType.BigEndian)
|
||||
{
|
||||
AudioClipConverter.LegacyRawWavSwapEndian(audioBuff, m_AudioClip.m_AudioData.Size, (LegacyAudioType)m_AudioClip.m_Format);
|
||||
}
|
||||
var wavHeaderBuff = AudioClipConverter.LegacyRawWavGenerateHeader(m_AudioClip, ref debugLog);
|
||||
file.Write(wavHeaderBuff, 0, wavHeaderBuff.Length);
|
||||
}
|
||||
|
||||
file.Write(audioBuff, 0, m_AudioClip.m_AudioData.Size);
|
||||
}
|
||||
}
|
||||
debugLog += $"{item.TypeString} \"{item.Text}\" exported to \"{exportFullPath}\"";
|
||||
|
||||
Reference in New Issue
Block a user