public static void AddPlayer(uint id, NAudio.Wave.IWaveProvider provider) { if (!_players.ContainsKey(id)) { _players.Add(id, new Player(provider)); } }
public Player(NAudio.Wave.IWaveProvider provider) { _provider = provider; _waveOut = new NAudio.Wave.WaveOut(); _waveOut.DeviceNumber = SelectedDevice; _waveOut.Init(_provider); Play(); }