Merge branch 'cdda_set_cdspeed' of git://github.com/andrewbasterfield/MPD
This commit is contained in:
commit
1155a29096
@ -1056,6 +1056,8 @@ Plays audio CDs using libcdio. The URI has the form: "cdda://[DEVICE][/TRACK]".
|
|||||||
- Description
|
- Description
|
||||||
* - **default_byte_order little_endian|big_endian**
|
* - **default_byte_order little_endian|big_endian**
|
||||||
- If the CD drive does not specify a byte order, MPD assumes it is the CPU's native byte order. This setting allows overriding this.
|
- If the CD drive does not specify a byte order, MPD assumes it is the CPU's native byte order. This setting allows overriding this.
|
||||||
|
* - **speed N**
|
||||||
|
- Request CDParanoia cap the extraction speed to Nx normal CD audio rotation speed, keeping the drive quiet.
|
||||||
|
|
||||||
curl
|
curl
|
||||||
~~~~
|
~~~~
|
||||||
|
@ -104,6 +104,7 @@ class CdioParanoiaInputStream final : public InputStream {
|
|||||||
static constexpr Domain cdio_domain("cdio");
|
static constexpr Domain cdio_domain("cdio");
|
||||||
|
|
||||||
static bool default_reverse_endian;
|
static bool default_reverse_endian;
|
||||||
|
static unsigned speed = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
input_cdio_init(EventLoop &, const ConfigBlock &block)
|
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",
|
throw FormatRuntimeError("Unrecognized 'default_byte_order' setting: %s",
|
||||||
value);
|
value);
|
||||||
}
|
}
|
||||||
|
speed = block.GetBlockValue("speed",0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct cdio_uri {
|
struct cdio_uri {
|
||||||
@ -209,6 +211,10 @@ input_cdio_open(const char *uri,
|
|||||||
}
|
}
|
||||||
|
|
||||||
cdda_verbose_set(drv, CDDA_MESSAGE_FORGETIT, CDDA_MESSAGE_FORGETIT);
|
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)) {
|
if (0 != cdio_cddap_open(drv)) {
|
||||||
cdio_cddap_close_no_free_cdio(drv);
|
cdio_cddap_close_no_free_cdio(drv);
|
||||||
|
Loading…
Reference in New Issue
Block a user