You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

audio_ffmpeg.cs 401 B

8 years ago
1234567891011
  1. private async Task SendAsync(IAudioClient client, string path)
  2. {
  3. // Create FFmpeg using the previous example
  4. using (var ffmpeg = CreateStream(path))
  5. using (var output = ffmpeg.StandardOutput.BaseStream)
  6. using (var discord = client.CreatePCMStream(AudioApplication.Mixed))
  7. {
  8. try { await output.CopyToAsync(discord); }
  9. finally { await discord.FlushAsync(); }
  10. }
  11. }