diff options
author | Andrew Basterfield <abasterfield@gmail.com> | 2018-10-06 20:18:19 +0100 |
---|---|---|
committer | Andrew Basterfield <abasterfield@gmail.com> | 2018-10-06 20:18:19 +0100 |
commit | 2f07b8f4822644cb08d17de4011b4cb9cebe2b12 (patch) | |
tree | 6dcac88ce234d48f846c483dd42aeffaecc2636d /src/input | |
parent | 6c40a278090e1621aaa6bc4c7a2cb6746d09e5e1 (diff) |
Set cdrive speed hint for cdparanoia
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/plugins/CdioParanoiaInputPlugin.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx index 4b08cf990..221384df1 100644 --- a/src/input/plugins/CdioParanoiaInputPlugin.cxx +++ b/src/input/plugins/CdioParanoiaInputPlugin.cxx @@ -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); |