summaryrefslogtreecommitdiff
path: root/DiscoBot/Audio.cs
blob: 68c860c093544e38a888646a180da2642665d9d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
        }
    }

    
}