Click or drag to resize
PlayerExAddMixData Method
Adds and mixes the audio data for playing.

Namespace: Alvas.Audio
Assembly: Alvas.Audio (in Alvas.Audio.dll) Version: 2016.0.6173.41573
Syntax
public void AddMixData(
	params byte[][] data
)

Parameters

data
Type: SystemByte
The audio data.
Examples
This example shows how mixed audio data plays.
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();
}
See Also