Page 1 of 1

Streaming from CD or DVD

Posted: Mon May 30, 2005 1:28 am
by R0
Can somebody explain advantages of data streaming from disc if there are any? I noticed some functions like cdStRead in libcdvd.h but I don't know what they are for. It seems there was no discussion of such features or at least I failed to find it (no topics or code examples).

Btw, what's difference between CdStop() and CdPause() ?

Posted: Mon May 30, 2005 12:51 pm
by Guest
There are others more expert at this, but they must be sleeping right now.

I am guessing that some data, such as music and videos, are most efficiently streamed from the disk. In other words, a constant sequential stream of data, as opposed to data access in traditional random-access methods, such as program/game data.

cdstop() and cdpause() are probably equivalent to the same concept on a normal cd player - stop causes all current playback to end and the laser usually resets to the beginning of the disk. Pause causes the laser to stop tracking and the stream is temporarily stopped.

This is just speculation mind you. It would certainly be more helpful if others responded. ;)

Posted: Mon May 30, 2005 1:20 pm
by Drakonite
cdStRead continually fills a ringbuffer from the cd without having to tell it to read the next chunk.

It could be used for something like setting the drive to 1x speed and streaming from an audio cd to a buffer which is read from by a cd audio playback thread, and thus wouldn't require you to manually read the sectors each frame.

AFAIK this isn't used very often, even by commercial games. Chances are it's not something you'll have a use for either.

At least this is what I've been told, I don't have a use for it so I haven't played with it ;)