public void PlaySound( string wave, PlayDevices playDevice = PlayDevices.Both, bool isSync = false, float?volume = null) { if (!File.Exists(wave)) { return; } if (!isSync) { Task.Run(() => SoundPlayerWrapper.Play(wave, playDevice, isSync, volume)); } else { Task.Run(() => { lock (WaveBlocker) { SoundPlayerWrapper.Play(wave, playDevice, isSync, volume); } }); } }
public void PlaySound( string wave, int volume) { if (!File.Exists(wave)) { return; } Task.Run(() => SoundPlayerWrapper.Play(wave)); }
public void PlaySound( string wave, int volume, PlayDevices playDevice = PlayDevices.Both) { if (!File.Exists(wave)) { return; } Task.Run(() => SoundPlayerWrapper.Play(wave, playDevice)); }