From 084b788627db03a009c6f8ef8cfc15d6ae5fd0f0 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 00:11:20 +0100 Subject: [PATCH] ALSA_support: correct error codes 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpp/ALSA_support.cpp b/src/cpp/ALSA_support.cpp index ecd34dd..eea0bcd 100644 --- a/src/cpp/ALSA_support.cpp +++ b/src/cpp/ALSA_support.cpp @@ -423,7 +423,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type) default: DSP::log << "Unsupported no of bytes in channel" << endl; - return -1; + return -6; break; } } @@ -495,7 +495,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type) default: DSP::log << "Unsupported no of bytes in channel" << endl; - return -1; + return -6; break; } } @@ -507,7 +507,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type) if (rc < 0) { DSP::log << "Unable to set blocking mode" << endl; - return -1; + return -7; } } @@ -518,7 +518,7 @@ int DSP::ALSA_object_t::open_alsa_device(snd_pcm_stream_t stream_type) if (rc < 0) { DSP::log << "Unable to set non blocking mode" << endl; - return -1; + return -8; } } -- GitLab