public SoundOutDevice(string name, string id, SoundOutType soundOutType, bool isDefault) { Name = name; Id = id; IsDefault = isDefault; Type = soundOutType; }
public SoundOutMode(string name, SoundOutType type, GetSoundOutDevice soundDeviceDelegate, GetISoundOut getISoundOutDelegate, ISoundOutDevice windowsDefaultDevice) { Name = name; Devices = new ObservableCollection <ISoundOutDevice>(); _soundOutDeviceDelegate = soundDeviceDelegate; _windowsDefaultDevice = windowsDefaultDevice; _getISoundOut = getISoundOutDelegate; SoundOutType = type; }
public SoundOutMode(string name, SoundOutType type, GetSoundOutDevice soundDeviceDelegate, GetISoundOut getISoundOutDelegate, ISoundOutDevice windowsDefaultDevice) { Name = name; Devices = new ObservableCollection<ISoundOutDevice>(); _soundOutDeviceDelegate = soundDeviceDelegate; _windowsDefaultDevice = windowsDefaultDevice; _getISoundOut = getISoundOutDelegate; SoundOutType = type; }
public void CreateSoundOut(SoundOutType soundOutType) { if (IsCreated) { Destroy(); } IsInitialized = false; switch (soundOutType) { case SoundOutType.WaveOut: _soundOut = new WaveOutWindow() { Latency = 70 }; break; case SoundOutType.DirectSound: _soundOut = new DirectSoundOut() { Latency = 50 }; break; case SoundOutType.Wasapi: _soundOut = new WasapiOut(); break; default: _soundOutType = SoundOutType.None; throw new ArgumentOutOfRangeException("soundOutType"); } _soundOutType = soundOutType; _soundOut.Stopped += (s, e) => Stop(); }
public void SetupAudioPlayer(SoundOutType soundOutType) { SoundOutManager.CreateSoundOut(soundOutType); }
public SoundOutDevice(string name, string id, SoundOutType soundOutType) : this(name, id, soundOutType, false) { }
public void CreateSoundOut(SoundOutType soundOutType) { if (IsCreated) Destroy(); IsInitialized = false; switch (soundOutType) { case SoundOutType.WaveOut: _soundOut = new WaveOutWindow() { Latency = 70 }; break; case SoundOutType.DirectSound: _soundOut = new DirectSoundOut() { Latency = 50 }; break; case SoundOutType.Wasapi: _soundOut = new WasapiOut(); break; default: _soundOutType = SoundOutType.None; throw new ArgumentOutOfRangeException("soundOutType"); } _soundOutType = soundOutType; _soundOut.Stopped += (s, e) => Stop(); }