From cac1ade8763605c3cf09859a48358cab0e00027a Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Sun, 8 Apr 2018 23:06:21 +0200 Subject: Added Audio Support --- DiscoBot/Audio.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 DiscoBot/Audio.cs (limited to 'DiscoBot/Audio.cs') diff --git a/DiscoBot/Audio.cs b/DiscoBot/Audio.cs new file mode 100644 index 0000000..68c860c --- /dev/null +++ b/DiscoBot/Audio.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace DiscoBot +{ + using System.Diagnostics; + + class Audio + { + private Process CreateStream(string path) + { + var ffmpeg = new ProcessStartInfo + { + FileName = "ffmpeg", + Arguments = $"-i {path} -ac 2 -f s16le -ar 48000 pipe:1", + UseShellExecute = false, + RedirectStandardOutput = true, + }; + return Process.Start(ffmpeg); + } + } + + +} -- cgit v1.2.3-54-g00ecf