From 88c77f9c8ab6d5aec78acc010d2769898fe28cd4 Mon Sep 17 00:00:00 2001 From: lazypingu <126294998+lazypingu@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:30:43 +0100 Subject: [PATCH] Add debug logging if setting speed failed --- src/input/plugins/CdioParanoiaInputPlugin.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx index 335b51810..a5b193454 100644 --- a/src/input/plugins/CdioParanoiaInputPlugin.cxx +++ b/src/input/plugins/CdioParanoiaInputPlugin.cxx @@ -224,7 +224,10 @@ input_cdio_open(const char *uri, if (speed > 0) { FmtDebug(cdio_domain, "Attempting to set CD speed to {}x", speed); - cdio_cddap_speed_set(drv,speed); + /* Negative value indicate error (e.g. -405: not supported) */ + if (cdio_cddap_speed_set(drv,speed) < 0) + FmtDebug(cdio_domain, "Failed to set CD speed to {}x", + speed); } bool reverse_endian;