[haiku-commits] r38447 - haiku/trunk/src/add-ons/media/media-add-ons/mixer

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 30 Aug 2010 15:01:44 +0200 (CEST)

Author: stippi
Date: 2010-08-30 15:01:44 +0200 (Mon, 30 Aug 2010)
New Revision: 38447
Changeset: http://dev.haiku-os.org/changeset/38447

Modified:
   haiku/trunk/src/add-ons/media/media-add-ons/mixer/MixerInput.h
Log:
Print the debug output only for the first channel,
more channels don't add more information.


Modified: haiku/trunk/src/add-ons/media/media-add-ons/mixer/MixerInput.h
===================================================================
--- haiku/trunk/src/add-ons/media/media-add-ons/mixer/MixerInput.h      
2010-08-30 11:36:02 UTC (rev 38446)
+++ haiku/trunk/src/add-ons/media/media-add-ons/mixer/MixerInput.h      
2010-08-30 13:01:44 UTC (rev 38447)
@@ -130,17 +130,20 @@
        if (!fEnabled)
                return false;
 
-#if 1
+#if DEBUG
        if (time < (fLastDataAvailableTime - duration_for_frames(
                        fMixBufferFrameRate, fMixBufferFrameCount))
                || (time + duration_for_frames(fMixBufferFrameRate,
                        fDebugMixBufferFrames)) >= fLastDataAvailableTime) {
-               ERROR("MixerInput::GetMixerChannelInfo: reading wrong data, 
have %Ld "
-                       "to %Ld, reading from %Ld to %Ld\n",
-                       fLastDataAvailableTime - 
duration_for_frames(fMixBufferFrameRate,
-                               fMixBufferFrameCount), fLastDataAvailableTime, 
time,
-                       time + duration_for_frames(fMixBufferFrameRate,
-                       fDebugMixBufferFrames));
+               // Print this error for the first channel only.
+               if (mixerChannel == 0) {
+                       ERROR("MixerInput::GetMixerChannelInfo: reading wrong 
data, have %Ld "
+                               "to %Ld, reading from %Ld to %Ld\n",
+                               fLastDataAvailableTime - 
duration_for_frames(fMixBufferFrameRate,
+                                       fMixBufferFrameCount), 
fLastDataAvailableTime, time,
+                               time + duration_for_frames(fMixBufferFrameRate,
+                               fDebugMixBufferFrames));
+               }
        }
 #endif
 


Other related posts:

  • » [haiku-commits] r38447 - haiku/trunk/src/add-ons/media/media-add-ons/mixer - superstippi