From 5f7204a1596be93784b1de153c4fb3ee9fd74460 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Damian=20Kara=C5=9B?= <s176030@student.pg.edu.pl>
Date: Fri, 12 Nov 2021 12:23:41 +0100
Subject: [PATCH] ALSA_support: fixed non-blocking mode
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   | 4 ++--
 src/include/ALSA_support.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cpp/ALSA_support.cpp b/src/cpp/ALSA_support.cpp
index eea0bcd..aec1b07 100644
--- a/src/cpp/ALSA_support.cpp
+++ b/src/cpp/ALSA_support.cpp
@@ -28,7 +28,7 @@ DSP::ALSA_object_t::ALSA_object_t()
 
   IsHigherQualityMode = false;
 
-  blocking_mode = false;
+  non_blocking_mode = true;
 
   IsDeviceInputOpen = false;
   IsDeviceOutputOpen = false;
@@ -500,7 +500,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type)
     }
   }
 
-  if (blocking_mode == false)
+  if (non_blocking_mode == false)
   {
     rc = snd_pcm_nonblock(alsa_handle, 0);
 
diff --git a/src/include/ALSA_support.h b/src/include/ALSA_support.h
index 4984d65..54ff335 100644
--- a/src/include/ALSA_support.h
+++ b/src/include/ALSA_support.h
@@ -72,7 +72,7 @@ namespace DSP {
         snd_pcm_uframes_t audio_inbuffer_size_in_frames; // M.B. more meaningful variable name
         
         //! We always use the non-blocking mode in DSPElib
-        bool blocking_mode;
+        bool non_blocking_mode;
         
         //! buffer capacity
         int size_b;
-- 
GitLab