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; }
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(); }
public void UpdateConnectionSettings(SimpleTcpConnectionSettings connectionSettings) { _connectionSettings = connectionSettings; }