コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: ebragge/SDE
 private void ThreadDelegate(HeartBeatType t, TimeWindow w , TDESample[] tde, AudioSample[] a)
 {
     try
     {
         var ign = Dispatcher.RunAsync(CoreDispatcherPriority.Low, () =>
         {
             lock(accessLock)
             {
                 beat++;
                 if (w != null && tde != null && a != null)
                 {
                     var l = w.End();
                     if (t == HeartBeatType.BUFFERING)
                     {
                         l = w.Begin();
                         UpdateUI(t, w, tde, a);
                     }
                     UpdateUI(t, w, tde, a);
                     //client.AddMessage(t, cc0, asdf0, peak0, max0, max1, ave0, ave1, ave_all, beat, b - lastTimeStamp, l - b);
                     lastTimeStamp = l;
                 }
             }
         });
     }
     catch (Exception ex)            {
         Error("ThreadDelegate: " + ex.ToString() + " " + ex.Message + " " + ex.HResult);
     }        
 }