mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
Remove ALSA debug message in optimized builds
This commit is contained in:
parent
d90d5c3701
commit
216935f16e
2 changed files with 13 additions and 3 deletions
|
|
@ -2155,7 +2155,9 @@ AlsaAudioBackend::AudioSlave::update_latencies (uint32_t play, uint32_t capt)
|
||||||
for (std::vector<BackendPortPtr>::const_iterator it = outputs.begin (); it != outputs.end (); ++it) {
|
for (std::vector<BackendPortPtr>::const_iterator it = outputs.begin (); it != outputs.end (); ++it) {
|
||||||
(*it)->set_latency_range (lr, true);
|
(*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 */
|
UpdateLatency (); /* EMIT SIGNAL */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,9 @@ AlsaAudioSlave::process_thread ()
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (!drain) {
|
if (!drain) {
|
||||||
|
#ifndef NDEBUG
|
||||||
printf ("Slave Process: Playback Buffer Underflow, have %u want %lu\n", _rb_playback.read_space (), _pcmi.nplay () * spp); // XXX DEBUG
|
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;
|
_play_latency += spp * _ratio;
|
||||||
update_latencies (_play_latency, _capt_latency);
|
update_latencies (_play_latency, _capt_latency);
|
||||||
}
|
}
|
||||||
|
|
@ -387,7 +389,9 @@ AlsaAudioSlave::cycle_start (double tme, double mst_speed, bool drain)
|
||||||
/* estimate required samples */
|
/* estimate required samples */
|
||||||
const double rratio = _ratio * mst_speed / slave_speed;
|
const double rratio = _ratio * mst_speed / slave_speed;
|
||||||
if (_rb_capture.read_space() < ceil (nchn * _samples_per_period / rratio)) {
|
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
|
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;
|
_capt_latency += _samples_per_period;
|
||||||
update_latencies (_play_latency, _capt_latency);
|
update_latencies (_play_latency, _capt_latency);
|
||||||
return;
|
return;
|
||||||
|
|
@ -417,7 +421,9 @@ AlsaAudioSlave::cycle_start (double tme, double mst_speed, bool drain)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (underflow) {
|
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);
|
g_atomic_int_set(&_draining, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -492,7 +498,9 @@ AlsaAudioSlave::cycle_end ()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overflow) {
|
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);
|
g_atomic_int_set(&_draining, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue