Add print_verbose to print to stdout only in verbose mode

Equivalent of the cumbersome:
if (OS::get_singleton()->is_stdout_verbose())
	print_line(msg);
This commit is contained in:
Rémi Verschelde
2018-08-24 08:47:34 +02:00
parent 34e58fd831
commit de59fe04e7
22 changed files with 68 additions and 123 deletions

View File

@ -116,9 +116,7 @@ Error AudioDriverALSA::init_device() {
status = snd_pcm_hw_params_set_period_size_near(pcm_handle, hwparams, &period_size, NULL);
CHECK_FAIL(status < 0);
if (OS::get_singleton()->is_stdout_verbose()) {
print_line("audio buffer frames: " + itos(period_size) + " calculated latency: " + itos(period_size * 1000 / mix_rate) + "ms");
}
print_verbose("Audio buffer frames: " + itos(period_size) + " calculated latency: " + itos(period_size * 1000 / mix_rate) + "ms");
status = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &periods, NULL);
CHECK_FAIL(status < 0);