Exemplo n.º 1
0
        public AudioDevice(string guid)
        {
            this.device = new CoreAudioController().GetDevice(Guid.Parse(guid));

            this.muteObserver = new MuteObserver(this);
            this.muteObserver.Subscribe(this.device.MuteChanged);

            this.lastAction = DateTime.Now;
        }
Exemplo n.º 2
0
        /*
         * Creates controls for WindowsAudioDevice with GUID
         * guid: GUID of the WindowsAudioDevice to control
         */
        public AudioDevice(string guid)
        {
            this.device = new CoreAudioController().GetDevice(Guid.Parse(guid));
            if (this.device == null)
            {
                throw new Exception("Disconnected Audio-device in OBS-Settings. Exiting...");
            }

            this.muteObserver = new MuteObserver(this);
            this.muteObserver.Subscribe(this.device.MuteChanged);

            this.mute = this.IsMuted();
        }