tags:

views:

170

answers:

4

I just want to keep the DVD spinning in the DVD ROM drive once the disc is inserted.

My only purpose is to reduce the disc spin up time when the user finally wishes to play the DVD at some later point in time.

Users can choose whether s/he wants to prevent the disc from spinning down.

So, the question really is how can I change the spindown timeout for DVD ROM drive to never?

+2  A: 

I suppose you could seek random bits of file from the disk every coupe of seconds?

Preet Sangha
Any clever ideas on how to go about doing that? I don't want to "unnecessarily" read the disc if its spinning, or being used by other apps.
Trainee4Life
A: 

You can read disk, then her will be keep spinning in your drive.

Svisstack
+5  A: 

Perhaps you can keep reading from it at some interval.

But then if the user wants to eject the disk?
Or do some other operation that would need a "full lock" on the DVD rom?
Continuously reading the disk would make some operations more difficult and may increase frustration.

When the user decides to play a DVD, she knows the (little) initial delay before playing. I don't think you are going to gain anything great by minimizing this time.

DVD is pretty well known technology and when someone uses it they know what to expect.

And if someone is unhappy with the initial start time, for them there are other technologies.

Nivas
Liked your comments..
Trainee4Life
If the user wants to eject the disk, then I'll allow them to eject. "Full lock" operations.. I don't mind.. I'll give up on reading the disk. Is reading from the disc the only choice only implementing this feature? And I don't want to read the disc if its already spinning. As earlier commented, "the difference when playing a disc when it is sitting idle in the tray, and when it is playing from a spun up disc is drastic". So why not provide our endusers with this feature?
Trainee4Life
Assuming the solulution we take is reading from the disk at a interval, then how do you know when the user wants to eject the disk, or full lock operations, how would your program _know_ that the user wants to do something like this? Though this may definitely be possible programatically (closely with the OS), but i don't think it is worth the hassle. And also like Brian Rasmussen told in the comments, DVDs can be pretty noisy also.
Nivas
That said, it is pretty much up to you to decide (keeping in mind your purpose and target audience). I prefer we can agree to disagree, and wait for an answer that would give the actual answer: how to do what you want :-)
Nivas
This depends on many factors, such as filesystem cache: if the bit you want to read is cached, the disk won't be needed. It does seem like a good naive solution (that is, without directly accessing OS-details to do what you really want: change the spindown timeout).
Roger Pate
@Roger - So the question really boils down to how can I change the DVDROM drive spindown timeout to never. (Updated my question) Any ideas on how to go about doing it?
Trainee4Life
+3  A: 

Instead of keeping the drive spinning, is there any chance you could buffer a couple seconds worth so that you have the data ready in memory whilst the drive spins up?

Sam
Not possible with the current infrastructure in place. I don't control from "where" the dvd is played - bufferring few seconds would mean that dvd starts playing *from* the buffer initially till the drive spins up and then it smoothly reads *from* the disc.
Trainee4Life
@Trainee4Life: You could always start reading from the DVD in a seperate thread and use that to fill the buffer. Maybe better would be to create your own Stream and that would handle the buffer transparently for the rest of the code, switching between memory and DVD as needed.
Sam