public override void LoadView(bool loadData) { base.LoadView(loadData); _voiceChatCommand.GetCaptureDevices(); LocalVisualisationDataProvider = new AudioVisualizationDataProvider(); RemoteVisualisationDataProvider = new AudioVisualizationDataProvider(); Application = Application.Voip; Bitrate = 8192; }
public void DataProviderChanged(AudioVisualizationDataProvider dataProvider) { if (_currentDataProvider != null) { _currentDataProvider.SamplesAdded -= CurrentDataProviderOnSamplesAdded; } _currentDataProvider = dataProvider; _sampleDataLeft = new List <float>(); _sampleDataRight = new List <float>(); if (_currentDataProvider != null) { _currentDataProvider.SamplesAdded += CurrentDataProviderOnSamplesAdded; if (_dispatcherTimer == null) { _dispatcherTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(40) }; _dispatcherTimer.Tick += DispatcherTimerOnTick; } } }