mirror of
https://github.com/JorjBauer/aiie.git
synced 2024-12-22 14:30:34 +00:00
limit error messages
This commit is contained in:
parent
0bb712fc70
commit
18e43b7784
@ -35,7 +35,13 @@ static void audioCallback(void *unused, Uint8 *stream, int len)
|
||||
}
|
||||
} else {
|
||||
// Audio underrun
|
||||
printf("Audio underrun!\n");
|
||||
static uint8_t occurrenceCount = 0;
|
||||
if (++occurrenceCount < 10) {
|
||||
printf("Audio underrun!\n");
|
||||
if (occurrenceCount == 9) {
|
||||
printf(" (Suppressing further audio errors)\n");
|
||||
}
|
||||
}
|
||||
memset(stream, 0, len);
|
||||
}
|
||||
pthread_mutex_unlock(&sndmutex);
|
||||
|
Loading…
Reference in New Issue
Block a user