Skip to content

Commit

Permalink
Fix ALSA HW params pre-fill for non hardware PCMs
Browse files Browse the repository at this point in the history
Fixes #7
  • Loading branch information
arkq committed Jan 9, 2025
1 parent 1832c35 commit 31af24b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# SPDX-FileCopyrightText: 2014-2025 Arkadiusz Bokowy and contributors
# SPDX-License-Identifier: MIT

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.11)

project(svar
VERSION 1.2.0
VERSION 1.2.1
DESCRIPTION "Simple Voice Activated Recorder"
LANGUAGES C)

Expand Down
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* SVAR - main.c
* SPDX-FileCopyrightText: 2010-2021 Arkadiusz Bokowy and contributors
* SPDX-FileCopyrightText: 2010-2025 Arkadiusz Bokowy and contributors
* SPDX-License-Identifier: MIT
*/

Expand Down Expand Up @@ -172,7 +172,7 @@ static int pcm_set_hw_params(snd_pcm_t *pcm, char **msg) {

snd_pcm_hw_params_alloca(&params);

if ((err = snd_pcm_hw_params_any(pcm, params)) != 0) {
if ((err = snd_pcm_hw_params_any(pcm, params)) < 0) {
snprintf(buf, sizeof(buf), "Set all possible ranges: %s", snd_strerror(err));
goto fail;
}
Expand Down

0 comments on commit 31af24b

Please sign in to comment.