From d320ae029b136bb54fcd19f9c29fa033106ca1b8 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Sat, 12 Nov 2011 11:18:25 +0530 Subject: [PATCH] alsa: Minor debug code cleanup Remove a trap on underrun and uncomment a couple of useful debug prints (still enabled only when DEBUG_TIMING is defined). --- src/modules/alsa/alsa-sink.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 1386196..93ecb28 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -457,7 +457,7 @@ static size_t check_left_to_play(struct userdata *u, size_t n_bytes, pa_bool_t o left_to_play = 0; underrun = TRUE; -#ifdef DEBUG_TIMING +#if 0 PA_DEBUG_TRAP; #endif @@ -1727,13 +1727,17 @@ static void thread_func(void *userdata) { /* OK, the playback buffer is now full, let's * calculate when to wake up next */ -/* pa_log_debug("Waking up in %0.2fms (sound card clock).", (double) sleep_usec / PA_USEC_PER_MSEC); */ +#ifdef DEBUG_TIMING + pa_log_debug("Waking up in %0.2fms (sound card clock).", (double) sleep_usec / PA_USEC_PER_MSEC); +#endif /* Convert from the sound card time domain to the * system time domain */ cusec = pa_smoother_translate(u->smoother, pa_rtclock_now(), sleep_usec); -/* pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC); */ +#ifdef DEBUG_TIMING + pa_log_debug("Waking up in %0.2fms (system clock).", (double) cusec / PA_USEC_PER_MSEC); +#endif /* We don't trust the conversion, so we wake up whatever comes first */ rtpoll_sleep = PA_MIN(sleep_usec, cusec); -- 2.7.4