From a6e0f877c3f7e5e6fb611e1e9eabb490871c6ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 30 Aug 2010 13:01:44 +0000 Subject: [PATCH] Print the debug output only for the first channel, more channels don't add more information. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38447 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../media/media-add-ons/mixer/MixerInput.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/add-ons/media/media-add-ons/mixer/MixerInput.h b/src/add-ons/media/media-add-ons/mixer/MixerInput.h index b802cc6789..ee051950c7 100644 --- a/src/add-ons/media/media-add-ons/mixer/MixerInput.h +++ b/src/add-ons/media/media-add-ons/mixer/MixerInput.h @@ -130,17 +130,20 @@ MixerInput::GetMixerChannelInfo(int mixerChannel, int64 framepos, 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