mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:17:39 +02:00
don't put separator chars here
This commit is contained in:
@ -49,17 +49,18 @@ public static class SavWav
|
||||
|
||||
public static void Save(string filename, AudioClip clip, bool trim = false)
|
||||
{
|
||||
string wavCachePath = Path.Combine(Application.temporaryCachePath, "savewav");
|
||||
if (!filename.ToLower().EndsWith(".wav"))
|
||||
{
|
||||
filename += ".wav";
|
||||
}
|
||||
|
||||
var filepath = Path.Combine(Application.temporaryCachePath, filename);
|
||||
var filepath = Path.Combine(wavCachePath, filename);
|
||||
|
||||
// Make sure directory exists if user is saving to sub dir.
|
||||
if (!Directory.Exists(Path.GetDirectoryName(filepath)))
|
||||
if (!Directory.Exists(Path.GetDirectoryName(wavCachePath)))
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(filepath));
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(wavCachePath));
|
||||
}
|
||||
|
||||
using (var fileStream = new FileStream(filepath, FileMode.Create))
|
||||
|
Reference in New Issue
Block a user