Exemplo n.º 1
0
        public MpcTimeSource(ISampleClock clock, MpcConnectionSettings 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();
        }
Exemplo n.º 2
0
 public void UpdateConnectionSettings(MpcConnectionSettings connectionSettings)
 {
     _connectionSettings = connectionSettings;
 }