From 2fe11a797a0cc40948a27cd64f152668aac6e88f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kara=C5=9B?= <s176030@student.pg.edu.pl> Date: Tue, 16 Nov 2021 23:25:19 +0100 Subject: [PATCH] ALSA_support: correction in debug log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Damian KaraĹ <s176030@student.pg.edu.pl> --- src/cpp/ALSA_support.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/cpp/ALSA_support.cpp b/src/cpp/ALSA_support.cpp index d1be06b..444a82d 100644 --- a/src/cpp/ALSA_support.cpp +++ b/src/cpp/ALSA_support.cpp @@ -319,17 +319,8 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type) snd_pcm_hw_params_get_period_time(hw_params, &val, &dir); DSP::log << "period time = " << val << " us" << endl; - if (stream_type == SND_PCM_STREAM_PLAYBACK) - { - snd_pcm_hw_params_get_period_size(hw_params, &audio_outbuffer_size_in_frames, &dir); - DSP::log << "period size = " << audio_outbuffer_size_in_frames << " frames" << endl; - } - - else // stream_type == SND_PCM_STREAM_CAPTURE - { - snd_pcm_hw_params_get_period_size(hw_params, &audio_inbuffer_size_in_frames, &dir); - DSP::log << "period size = " << audio_inbuffer_size_in_frames << " frames" << endl; - } + snd_pcm_hw_params_get_period_size(hw_params, (snd_pcm_uframes_t *)&val, &dir); + DSP::log << "period size = " << audio_outbuffer_size_in_frames << " frames" << endl; snd_pcm_hw_params_get_buffer_time(hw_params, &val, &dir); DSP::log << "buffer time = " << val << " us" << endl; -- GitLab