summaryrefslogtreecommitdiff
path: root/drivers/alsa
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-24 08:47:34 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-08-24 09:23:20 +0200
commitde59fe04e73250229e6ac11f9314e1b75dbdef1a (patch)
treefa99f0927da10719fb7a7e1e8fcce3a97d5fe08c /drivers/alsa
parent34e58fd831172bad1eebb748c97238c28864423a (diff)
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);
Diffstat (limited to 'drivers/alsa')
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp
index a44a11a46d..1f53d52951 100644
--- a/drivers/alsa/audio_driver_alsa.cpp
+++ b/drivers/alsa/audio_driver_alsa.cpp
@@ -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);