You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Improved WASAPI driver logic when devices are connected or disconnected
This commit is contained in:
@@ -226,7 +226,7 @@ void AudioServer::_driver_process(int p_frames, int32_t *p_buffer) {
|
||||
static int total = 0;
|
||||
|
||||
ticks = OS::get_singleton()->get_ticks_msec();
|
||||
if ((ticks - first_ticks) > 10 * 1000) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user