using System; using System.Collections.Generic; using System.Diagnostics; namespace Speech.play { public class WinVLC : IPlaySystem { private string vlc_path; public WinVLC() { vlc_path = @"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"; } public Process Play(string path, string Device, int freq = 8000) { //vlc -I dummy --dummy-quiet t.mp3 vlc://quit Process p = new Process(); List arg = new List(); arg.Add("--stereo-mode=0"); arg.Add("--no-video"); arg.Add("--intf dummy"); arg.Add("-I dummy"); arg.Add("--dummy-quiet"); arg.Add(path); arg.Add("vlc://quit"); //p.StartInfo.FileName = this.vlc_path + " " + String.Join(' ', arg); p.StartInfo.FileName = this.vlc_path; p.StartInfo.Arguments = String.Join(' ', arg); p.StartInfo.WorkingDirectory = Environment.CurrentDirectory; p.StartInfo.CreateNoWindow = false; return p; } public string GetName() { return "VLC Player for Windows"; } } }