Esempio n. 1
0
        private void HandleLoaded(object sender, RoutedEventArgs e)
        {
            //if (ReadLocalValue(DescriptionProperty) == DependencyProperty.UnsetValue)
            //    SetCurrentValue(DescriptionProperty, GetType().Name);

            if (!this.IsInDesignMode() && this is IClockListener)
            {
                _audioLink.AttachClockListener(this as IClockListener);
            }
        }
Esempio n. 2
0
        public AudioClockDivider(IAudioLink audioLink, int targetClockRate, Action <ulong> tickHandler, bool rateMustBeExact = false)
        {
            if (audioLink == null)
            {
                throw new ArgumentNullException("audioLink");
            }
            _audioLink = audioLink;

            if (tickHandler == null)
            {
                throw new ArgumentNullException("tickHandler");
            }
            _tickHandler = tickHandler;

            _rateMustBeExact = rateMustBeExact;
            _targetRate      = targetClockRate;

            ApplyTargetRate();
            _audioLink.SampleRateChanged += HandleAudioQualityChanged;
            _audioLink.AttachClockListener(this);
        }