Пример #1
0
 public SoundOutDevice(string name, string id, SoundOutType soundOutType, bool isDefault)
 {
     Name      = name;
     Id        = id;
     IsDefault = isDefault;
     Type      = soundOutType;
 }
Пример #2
0
 public SoundOutDevice(string name, string id, SoundOutType soundOutType, bool isDefault)
 {
     Name = name;
     Id = id;
     IsDefault = isDefault;
     Type = soundOutType;
 }
Пример #3
0
 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;
 }
Пример #4
0
 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;
 }
Пример #5
0
        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();
        }
Пример #6
0
 public void SetupAudioPlayer(SoundOutType soundOutType)
 {
     SoundOutManager.CreateSoundOut(soundOutType);
 }
Пример #7
0
 public void SetupAudioPlayer(SoundOutType soundOutType)
 {
     SoundOutManager.CreateSoundOut(soundOutType);
 }
Пример #8
0
 public SoundOutDevice(string name, string id, SoundOutType soundOutType) : this(name, id, soundOutType, false)
 {
 }
Пример #9
0
        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();
        }
Пример #10
0
 public SoundOutDevice(string name, string id, SoundOutType soundOutType) : this(name, id, soundOutType, false)
 {
 }