Exemplo n.º 1
0
        public ModelVolumeControlUpnpAv(Preamp aPreamp)
        {
            iPreamp = aPreamp;
            iInstanceId = 0;

            iVolumeLimiter = new VolumeLimiter(this);

            try
            {
                iServiceRenderingControl = new ServiceRenderingControl(aPreamp.Device, aPreamp.House.EventServer);
            }
            catch (ServiceException)
            {
                throw new ModelSourceException(301, "Service failure");
            }

            iActionSetMute = iServiceRenderingControl.CreateAsyncActionSetMute();
            iActionSetVolume = iServiceRenderingControl.CreateAsyncActionSetVolume();
        }
Exemplo n.º 2
0
        public ModelVolumeControlPreamp(Preamp aPreamp)
        {
            iPreamp = aPreamp;

            iVolumeLimiter = new VolumeLimiter(this);

            try
            {
                iServiceVolume = new ServiceVolume(iPreamp.Device, iPreamp.House.EventServer);
            }
            catch (ServiceException)
            {
                throw new ModelSourceException(301, "Service failure");
            }

            iActionSetMute   = iServiceVolume.CreateAsyncActionSetMute();
            iActionSetVolume = iServiceVolume.CreateAsyncActionSetVolume();
            iActionVolumeInc = iServiceVolume.CreateAsyncActionVolumeInc();
            iActionVolumeDec = iServiceVolume.CreateAsyncActionVolumeDec();
        }