From 92468bbd4c5f72e4aa742f9f00d03bbd9419ca38 Mon Sep 17 00:00:00 2001 From: David Navrkal Date: Fri, 10 Nov 2017 11:56:05 +0100 Subject: [PATCH] Integrate decibel full scale to sample app. --- .gitignore | 2 ++ Client/Main/MainPage.xaml | 7 +++++-- Client/ViewModels/MainViewModel.cs | 21 +++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3a11af4..4e7cc4c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ bin/ obj/ packages/ +/Client/AppPackages/ +/Client/BundleArtifacts/ *.suo *.csproj.user project.lock.json diff --git a/Client/Main/MainPage.xaml b/Client/Main/MainPage.xaml index a0ae942..2451206 100644 --- a/Client/Main/MainPage.xaml +++ b/Client/Main/MainPage.xaml @@ -201,7 +201,7 @@ - @@ -250,13 +250,16 @@ RealTimePlayback="True" Name="SelfVideo" MediaFailed="SelfVideo_MediaFailed"/> - + + + + diff --git a/Client/ViewModels/MainViewModel.cs b/Client/ViewModels/MainViewModel.cs index d987ec6..b0553c7 100644 --- a/Client/ViewModels/MainViewModel.cs +++ b/Client/ViewModels/MainViewModel.cs @@ -278,6 +278,16 @@ public void Initialize(CoreDispatcher uiDispatcher) }); }; + DecibelFullScaleHelper.DecibelFullScaleComputed += (decibel) => + { + RunOnUiThread(() => + { + Debug.WriteLine(String.Format("{0} {1:N2}", DateTime.Now.ToString("mm:ss.fff"), decibel)); + PeerAudioDbFullScale = String.Format("{0:N2}", decibel); + }); + }; + + // Handler for Peer/Self video resolution changed event ResolutionHelper.ResolutionChanged += (id, width, height) => { @@ -1027,6 +1037,17 @@ public String PeerVideoFps set { SetProperty(ref _peerVideoFps, value); } } + private String _peerAudioDbFullScale; + + /// + /// Decibel full scale of local microphone + /// + public String PeerAudioDbFullScale + { + get { return _peerAudioDbFullScale; } + set { SetProperty(ref _peerAudioDbFullScale, value); } + } + private String _selfVideoFps; ///