Improve debug messages a little

This commit is contained in:
Mike Brady
2017-04-16 18:40:05 +01:00
parent 273b622c5f
commit 225efa127a
2 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -229,12 +229,14 @@ static void onmove_cb(void *arg, int delta) {
static int delay(long *_delay) {
pthread_mutex_lock(&sndio_mutex);
if (played > (written / framesize)) {
// debug(1,"Frames written %u, played %u.",written/framesize,played);
//if (played > (written / framesize)) {
/* _delay is in frames */
*_delay = (written / framesize) - played;
} else {
*_delay = 0;
}
// } else {
// *_delay = 0;
// }
pthread_mutex_unlock(&sndio_mutex);
return 0;
}
+2 -2
View File
@@ -1685,7 +1685,7 @@ static void *player_thread_func(void *arg) {
current_delay = l_delay;
if (resp == 0) { // no error
if (current_delay < 0) {
debug(1, "Underrun of %d frames reported, but ignored.", current_delay);
debug(1, "Underrun of %lld frames reported, but ignored.", current_delay);
current_delay =
0; // could get a negative value if there was underrun, but ignore it.
}
@@ -1728,7 +1728,7 @@ static void *player_thread_func(void *arg) {
// only allow stuffing if there is enough time to do it -- check DAC buffer...
if (current_delay < DAC_BUFFER_QUEUE_MINIMUM_LENGTH) {
// debug(1,"DAC buffer too short to allow stuffing.");
// debug(2,"DAC buffer too short(at %lld frames) to allow stuffing.",current_delay);
amount_to_stuff = 0;
}