Example #1
0
        public DeoVrTimeSource(ISampleClock clock, SimpleTcpConnectionSettings connectionSettings)
        {
            // Manual TimeSource that will interpolate Timestamps between updates

            _timeSource = new ManualTimeSource(clock, TimeSpan.FromMilliseconds(100));
            _timeSource.DurationChanged     += TimeSourceOnDurationChanged;
            _timeSource.IsPlayingChanged    += TimeSourceOnIsPlayingChanged;
            _timeSource.ProgressChanged     += TimeSourceOnProgressChanged;
            _timeSource.PlaybackRateChanged += TimeSourceOnPlaybackRateChanged;

            _connectionSettings = connectionSettings;
        }
Example #2
0
        public MpcTimeSource(ISampleClock clock, SimpleTcpConnectionSettings connectionSettings)
        {
            _connectionSettings = connectionSettings;
            _previousStatus     = new MpcStatus {
                IsValid = false
            };

            _timeSource = new ManualTimeSource(clock, TimeSpan.FromMilliseconds(35));
            _timeSource.DurationChanged     += TimeSourceOnDurationChanged;
            _timeSource.IsPlayingChanged    += TimeSourceOnIsPlayingChanged;
            _timeSource.ProgressChanged     += TimeSourceOnProgressChanged;
            _timeSource.PlaybackRateChanged += TimeSourceOnPlaybackRateChanged;

            _clientLoop = new Thread(ClientLoop);
            _clientLoop.Start();
        }
Example #3
0
 public void UpdateConnectionSettings(SimpleTcpConnectionSettings connectionSettings)
 {
     _connectionSettings = connectionSettings;
 }