Skip to content
This repository
Browse code

changed, refactor CSoftAEStream::GetDelay, CSoftAEStream::GetCacheTim…

…e and CSoftAEStream::GetCacheTotal to be similar
  • Loading branch information...
commit 0df13c9f63636f2d92cda07fff9bb96c701bcd19 1 parent 6b28a05
authored
11  xbmc/cores/AudioEngine/Engines/SoftAE/SoftAEStream.cpp
@@ -485,7 +485,6 @@ double CSoftAEStream::GetDelay()
485 485
   double delay = AE.GetDelay();
486 486
   delay += (double)(m_inputBuffer.Used() / m_format.m_frameSize) / (double)m_format.m_sampleRate;
487 487
   delay += (double)m_framesBuffered                              / (double)AE.GetSampleRate();
488  
-
489 488
   return delay;
490 489
 }
491 490
 
@@ -494,10 +493,9 @@ double CSoftAEStream::GetCacheTime()
494 493
   if (m_delete)
495 494
     return 0.0;
496 495
 
497  
-  double time;
498  
-  time  = (double)(m_inputBuffer.Used() / m_format.m_frameSize) / (double)m_format.m_sampleRate;
  496
+  double time = AE.GetCacheTime();
  497
+  time += (double)(m_inputBuffer.Used() / m_format.m_frameSize) / (double)m_format.m_sampleRate;
499 498
   time += (double)m_framesBuffered                              / (double)AE.GetSampleRate();
500  
-  time += AE.GetCacheTime();
501 499
   return time;
502 500
 }
503 501
 
@@ -506,10 +504,9 @@ double CSoftAEStream::GetCacheTotal()
506 504
   if (m_delete)
507 505
     return 0.0;
508 506
 
509  
-  double total;
510  
-  total  = (double)(m_inputBuffer.Size() / m_format.m_frameSize) / (double)m_format.m_sampleRate;
  507
+  double total = AE.GetCacheTotal();
  508
+  total += (double)(m_inputBuffer.Size() / m_format.m_frameSize) / (double)m_format.m_sampleRate;
511 509
   total += (double)m_waterLevel                                  / (double)AE.GetSampleRate();
512  
-  total += AE.GetCacheTotal();
513 510
   return total;
514 511
 }
515 512
 

0 notes on commit 0df13c9

Please sign in to comment.
Something went wrong with that request. Please try again.