[rhythmbox] audiocd: reset read speed to maximum for extraction
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] audiocd: reset read speed to maximum for extraction
- Date: Sat, 19 May 2012 09:04:29 +0000 (UTC)
commit 3f5e61fed3beacb27b4324d915998463fe2ad917
Author: Jonathan Matthew <jonathan d14n org>
Date: Sat May 19 19:01:22 2012 +1000
audiocd: reset read speed to maximum for extraction
cdparanoiasrc doesn't do this itself (though it should), so do it
ourselves. setting read-speed to -1 means cdparanoiasrc won't apply
it to the device, so use 0xffff instead, which is the maximum value
for the scsi command that gets sent to the device.
plugins/audiocd/rb-audiocd-plugin.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/audiocd/rb-audiocd-plugin.c b/plugins/audiocd/rb-audiocd-plugin.c
index 33a23d8..bd5ad08 100644
--- a/plugins/audiocd/rb-audiocd-plugin.c
+++ b/plugins/audiocd/rb-audiocd-plugin.c
@@ -127,6 +127,12 @@ set_source_properties (GstElement *source, const char *uri, gboolean playback_mo
/* also, sound-juicer defaults to 8 (scratch) not 0xff (full) here.. */
if (g_object_class_find_property (G_OBJECT_GET_CLASS (source), "paranoia-mode"))
g_object_set (source, "paranoia-mode", 0xff, NULL);
+
+ /* trick cdparanoiasrc into resetting the device speed in case we've
+ * previously set it to 1 for playback
+ */
+ if (g_object_class_find_property (G_OBJECT_GET_CLASS (source), "read-speed"))
+ g_object_set (source, "read-speed", 0xffff, NULL);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]