From 0f1118c142b356d5185c634a0b30313c44e382b4 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sun, 6 Jun 2021 15:48:09 +0100 Subject: [PATCH] Exit immediately if the speed or format cannot be set. --- audio_alsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio_alsa.c b/audio_alsa.c index 31b18da8..6bc1d97d 100644 --- a/audio_alsa.c +++ b/audio_alsa.c @@ -559,7 +559,7 @@ int actual_open_alsa_device(int do_auto_setup) { if (ret == 0) { speed_found = 1; if (actual_sample_rate != speeds[i]) - warn("Speed requested: %d. Speed available: %d.", speeds[i], actual_sample_rate); + die("The frame rate of the output DAC can not be set to a multiple of 44100 fps. (The nearest speed available is: %d fps.)", speeds[i], actual_sample_rate); } else { i++; } @@ -641,7 +641,7 @@ int actual_open_alsa_device(int do_auto_setup) { } if (actual_sample_rate != config.output_rate) { - warn("Can't set the D/A converter to sample rate %d.", config.output_rate); + die("Can't set the output DAC to the requested frame rate of %d fps.", config.output_rate); return -EINVAL; }