mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Remove audio latency print
This commit is contained in:
parent
a9acdd84b7
commit
5d61cdf5b5
@ -234,29 +234,6 @@ void AudioServer::_driver_process(int p_frames, int32_t *p_buffer) {
|
||||
todo -= to_copy;
|
||||
to_mix -= to_copy;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (OS::get_singleton() && OS::get_singleton()->is_stdout_verbose()) {
|
||||
static uint64_t first_ticks = 0;
|
||||
static uint64_t last_ticks = 0;
|
||||
static uint64_t ticks = 0;
|
||||
static int count = 0;
|
||||
static int total = 0;
|
||||
|
||||
ticks = OS::get_singleton()->get_ticks_msec();
|
||||
if ((ticks - first_ticks) > 10 * 1000 && count > 0) {
|
||||
print_line("Audio Driver " + String(AudioDriver::get_singleton()->get_name()) + " average latency: " + itos(total / count) + "ms (frame=" + itos(p_frames) + ")");
|
||||
first_ticks = ticks;
|
||||
total = 0;
|
||||
count = 0;
|
||||
}
|
||||
|
||||
total += ticks - last_ticks;
|
||||
count++;
|
||||
|
||||
last_ticks = ticks;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AudioServer::_mix_step() {
|
||||
|
Loading…
Reference in New Issue
Block a user