Commit 2f07b8f4 authored by Andrew Basterfield's avatar Andrew Basterfield

Set cdrive speed hint for cdparanoia

parent 6c40a278
......@@ -104,6 +104,7 @@ class CdioParanoiaInputStream final : public InputStream {
static constexpr Domain cdio_domain("cdio");
static bool default_reverse_endian;
static unsigned speed = 0;
static void
input_cdio_init(EventLoop &, const ConfigBlock &block)
......@@ -118,6 +119,7 @@ input_cdio_init(EventLoop &, const ConfigBlock &block)
throw FormatRuntimeError("Unrecognized 'default_byte_order' setting: %s",
value);
}
speed = block.GetBlockValue("speed",0u);
}
struct cdio_uri {
......@@ -209,6 +211,12 @@ input_cdio_open(const char *uri,
}
cdda_verbose_set(drv, CDDA_MESSAGE_FORGETIT, CDDA_MESSAGE_FORGETIT);
if (speed > 0) {
FormatDebug(cdio_domain,"Attempting to set CD speed to %dx",speed);
cdda_speed_set(drv,speed);
} else {
FormatDebug(cdio_domain,"Leaving CD speed alone");
}
if (0 != cdio_cddap_open(drv)) {
cdio_cddap_close_no_free_cdio(drv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment