PlayerExAddMixData Method |
Namespace: Alvas.Audio
public void PlayMix() { string dir = Path.GetDirectoryName(Application.ExecutablePath); string path1 = dir + @"\1.wav"; WaveReader wr1 = new WaveReader(File.OpenRead(path1)); IntPtr format = wr1.ReadFormat(); WaveFormat wf = AudioCompressionManager.GetWaveFormat(format); playEx.OpenPlayer(format);//validFormat byte[] data1 = wr1.ReadData(); wr1.Close(); //---------- string path2 = dir + @"\2.wav"; WaveReader wr2 = new WaveReader(File.OpenRead(path2)); byte[] data2 = wr2.ReadData(); wr2.Close(); playEx.AddMixData(data1, data2); playEx.StartPlay(); }