diff --git a/libs/backends/alsa/alsa_audiobackend.cc b/libs/backends/alsa/alsa_audiobackend.cc index f8e7d2a3dc..dcb5bb6da5 100644 --- a/libs/backends/alsa/alsa_audiobackend.cc +++ b/libs/backends/alsa/alsa_audiobackend.cc @@ -2155,7 +2155,9 @@ AlsaAudioBackend::AudioSlave::update_latencies (uint32_t play, uint32_t capt) for (std::vector::const_iterator it = outputs.begin (); it != outputs.end (); ++it) { (*it)->set_latency_range (lr, true); } - printf (" ----- SLAVE LATENCY play=%d capt=%d\n", play, capt); // XXX DEBUG +#ifndef NDEBUG + printf ("ALSA SLAVE-device latency play=%d capt=%d\n", play, capt); // XXX DEBUG +#endif UpdateLatency (); /* EMIT SIGNAL */ } diff --git a/libs/backends/alsa/alsa_slave.cc b/libs/backends/alsa/alsa_slave.cc index 526afc3abe..4332bcc26e 100644 --- a/libs/backends/alsa/alsa_slave.cc +++ b/libs/backends/alsa/alsa_slave.cc @@ -321,7 +321,9 @@ AlsaAudioSlave::process_thread () #endif } else { if (!drain) { +#ifndef NDEBUG printf ("Slave Process: Playback Buffer Underflow, have %u want %lu\n", _rb_playback.read_space (), _pcmi.nplay () * spp); // XXX DEBUG +#endif _play_latency += spp * _ratio; update_latencies (_play_latency, _capt_latency); } @@ -387,7 +389,9 @@ AlsaAudioSlave::cycle_start (double tme, double mst_speed, bool drain) /* estimate required samples */ const double rratio = _ratio * mst_speed / slave_speed; if (_rb_capture.read_space() < ceil (nchn * _samples_per_period / rratio)) { +#ifndef NDEBUG printf ("--- UNDERFLOW --- have %u want %.1f\n", _rb_capture.read_space(), ceil (nchn * _samples_per_period / rratio)); // XXX DEBUG +#endif _capt_latency += _samples_per_period; update_latencies (_play_latency, _capt_latency); return; @@ -417,7 +421,9 @@ AlsaAudioSlave::cycle_start (double tme, double mst_speed, bool drain) } if (underflow) { - std::cerr << "ALSA Slave: Capture Ringbuffer Underflow\n"; // XXX +#ifndef NDEBUG + std::cerr << "ALSA Slave: Capture Ringbuffer Underflow\n"; // XXX DEBUG +#endif g_atomic_int_set(&_draining, 1); } @@ -492,7 +498,9 @@ AlsaAudioSlave::cycle_end () } if (overflow) { - std::cerr << "ALSA Slave: Playback Ringbuffer Overflow\n"; // XXX +#ifndef NDEBUG + std::cerr << "ALSA Slave: Playback Ringbuffer Overflow\n"; // XXX DEBUG +#endif g_atomic_int_set(&_draining, 1); return; }