Files
Discord.Net/docs/guides/voice/samples/audio_ffmpeg.cs
Bond-009 a92c27da3b Remove wrong parameter from FFMPEG audio example
This parameter was samples per frame but changed to bitrate. (1920 is a way to low bitrate :) )
2017-05-11 18:01:39 +02:00

10 lines
340 B
C#

private async Task SendAsync(IAudioClient client, string path)
{
// Create FFmpeg using the previous example
var ffmpeg = CreateStream(path);
var output = ffmpeg.StandardOutput.BaseStream;
var discord = client.CreatePCMStream(AudioApplication.Mixed);
await output.CopyToAsync(discord);
await discord.FlushAsync();
}