mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-29 18:34:33 +00:00
Binka.cs - Updated 'ToWav(Stream source, Stream destination)'
This commit is contained in:
@@ -25,13 +25,9 @@ namespace PckStudio.API.Miles
|
||||
|
||||
public static void ToWav(Stream source, Stream destination)
|
||||
{
|
||||
string sourceFilepath = Path.GetTempFileName();
|
||||
using (var sourceFs = File.OpenWrite(sourceFilepath))
|
||||
{
|
||||
source.CopyTo(sourceFs);
|
||||
}
|
||||
byte[] buffer = ToWav(sourceFilepath);
|
||||
File.Delete(sourceFilepath);
|
||||
using var sourceFs = new MemoryStream();
|
||||
source.CopyTo(sourceFs);
|
||||
byte[] buffer = ToWav(sourceFs.ToArray());
|
||||
|
||||
using(var ms = new MemoryStream(buffer))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user