Exit immediately if the speed or format cannot be set.

This commit is contained in:
Mike Brady
2021-06-06 15:48:09 +01:00
parent 142478933f
commit 0f1118c142
+2 -2
View File
@@ -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;
}