[WIP] Add read speed option - #60
Conversation
Bloomca
left a comment
There was a problem hiding this comment.
I think this API looks good! I left a few comments for the implementation, also there a few typos in the comments but we can fix it later.
I think we should an example of "slow_read_track" which would read the first track from the default drive at 10x.
@strict-flower One question I am curious about and forgot to ask in the issue. If custom multiplier does persist (we'll need to test it), do you think we should set speed back to optimal in the drive destructor?
|
@Bloomca Thanks for the quick review. I've fixed them. I'll write & testing the Linux implementation today.
I tested that. The DKIOCCDSETSPEED ioctl seems to set the drive speed until the disc is ejected. Below is my experiment summary.
... and the default state seems to be Optimal, but we can't confirm that because DKIOCCDGETSPEED only returns the current speed1, according to my experiments. Footnotes
|
|
I think it's difficult to restore the original state. At least, macOS doesn't seem to provide a way to get the original state. Moreover, we could get the read speed performance data of the drive, but we can't get the current speed policy of the drive. In other words, even if the current speed is 10x, we can't determine whether the value was set by another program, is the default value of the drive, or was selected automatically.
|
|
I wrote the implementation for Linux and tested. It seems to work correctly. Also I tested
Although I didn't eject the CD during the above procedure, the speed setting did not persist. On Linux, it seems to be reset on each Additionally, I tested this on an internal disc drive (ASUS BC-12D2HT). This drive seems to ignore the requested speed with the Thus, unlike my earlier comments, I think the best destructor behaviour may be OS-dependent. However, there is also the possibility that we don't need to restore the policy at all.
Footnotes
|
|
Thanks for the comprehensive testing! Alright, I believe it is easier to skip restoring and just document that the behavior is OS/drive dependent. I thought for a second to expose Can you please add a test where we read first track on ~10x speed, and then second track on optimal speed? After that I think we can just merge your PR and I will make a separate Windows PR.
|
Under development
Description
Background discussion is #59
Adds an option to request to set the read speed of the tracks.