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
This commit is contained in:
Stephan Aßmus
2010-08-30 13:01:44 +00:00
parent 4cc71346c4
commit a6e0f877c3
@@ -130,11 +130,13 @@ MixerInput::GetMixerChannelInfo(int mixerChannel, int64 framepos,
if (!fEnabled) if (!fEnabled)
return false; return false;
#if 1 #if DEBUG
if (time < (fLastDataAvailableTime - duration_for_frames( if (time < (fLastDataAvailableTime - duration_for_frames(
fMixBufferFrameRate, fMixBufferFrameCount)) fMixBufferFrameRate, fMixBufferFrameCount))
|| (time + duration_for_frames(fMixBufferFrameRate, || (time + duration_for_frames(fMixBufferFrameRate,
fDebugMixBufferFrames)) >= fLastDataAvailableTime) { fDebugMixBufferFrames)) >= fLastDataAvailableTime) {
// Print this error for the first channel only.
if (mixerChannel == 0) {
ERROR("MixerInput::GetMixerChannelInfo: reading wrong data, have %Ld " ERROR("MixerInput::GetMixerChannelInfo: reading wrong data, have %Ld "
"to %Ld, reading from %Ld to %Ld\n", "to %Ld, reading from %Ld to %Ld\n",
fLastDataAvailableTime - duration_for_frames(fMixBufferFrameRate, fLastDataAvailableTime - duration_for_frames(fMixBufferFrameRate,
@@ -142,6 +144,7 @@ MixerInput::GetMixerChannelInfo(int mixerChannel, int64 framepos,
time + duration_for_frames(fMixBufferFrameRate, time + duration_for_frames(fMixBufferFrameRate,
fDebugMixBufferFrames)); fDebugMixBufferFrames));
} }
}
#endif #endif
if (time > fLastDataAvailableTime) if (time > fLastDataAvailableTime)