private void button1_Click (object sender, EventArgs e) { OdbcConnection cn = new OdbcConnection ("DSN = cp1"); cn.Open (); OdbcCommand cmd1 = new OdbcCommand ("select path from WHERE Code Alarm alarm = 32 ", cn); cmd1.Connection = cn; fileName = cmd1.ToString (); WaveOut wave = new (); wave.DeviceNumber = 0; playSound (0);
public void PlaySound (int deviceNumber) { disposeWave ();// stop previous sounds Before Starting waveReader = new NAudio.Wave.WaveFileReader (fileName); var waveOut NAudio.Wave.WaveOut = new (); waveOut.DeviceNumber = deviceNumber; var output = waveOut; output.Init (waveReader); output.Play (); }
fileName = cmd1.ToString ();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)