summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-10-08 21:16:52 +0200
committerMax Kellermann <max@musicpd.org>2018-10-08 21:16:52 +0200
commit1155a2909620f53237f8cf13056eb31496ee78f6 (patch)
treefb838a0ec2b2cd551c5df6584ee443c1e95c0b7e /src
parent030e6039403f3145b4f207d8f4eddb260fb577ed (diff)
parent9c1bf9ac5fd76c81b52748408395c006f3dd8a48 (diff)
Merge branch 'cdda_set_cdspeed' of git://github.com/andrewbasterfield/MPD
Diffstat (limited to 'src')
-rw-r--r--src/input/plugins/CdioParanoiaInputPlugin.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx
index 4b08cf990..eeba659b8 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,10 @@ 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);
+ }
if (0 != cdio_cddap_open(drv)) {
cdio_cddap_close_no_free_cdio(drv);