create the mp3 -> wav cache if it doesn't exist

This commit is contained in:
minenice55 2024-01-10 18:53:57 -05:00 committed by GitHub
parent cb3b21389e
commit 214ebba172
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,8 @@ namespace HeavenStudio
{ {
Directory.Delete(Path.Combine(Application.temporaryCachePath, "/savewav"), true); Directory.Delete(Path.Combine(Application.temporaryCachePath, "/savewav"), true);
} }
if (!Directory.Exists(Application.temporaryCachePath, "/savewav"))
Directory.CreateDirectory(Application.temporaryCachePath, "/savewav");
if (audioType == AudioType.MPEG) if (audioType == AudioType.MPEG)
{ {
Debug.Log($"mp3 loaded, Converting {filePath} to wav..."); Debug.Log($"mp3 loaded, Converting {filePath} to wav...");