From 6f272d7bba99b0838b2ea8bbbe5e2f1837dd8017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kara=C5=9B?= <s176030@student.pg.edu.pl> Date: Wed, 10 Nov 2021 19:01:11 +0100 Subject: [PATCH] ALSA_support: interrupt in case of unable to set buffer size 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpp/ALSA_support.cpp b/src/cpp/ALSA_support.cpp index 17bb157..ecd34dd 100644 --- a/src/cpp/ALSA_support.cpp +++ b/src/cpp/ALSA_support.cpp @@ -216,7 +216,8 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type) if (rc < 0) { - DSP::log << "Buffer size set with error code: " << rc << endl; + DSP::log << "Unable to set a buffer size with error code: " << rc << endl; + return -5; } /*! Set period size to desired number of frames. */ -- GitLab