Hallo everybody!
When I open my CD-Drive with a cd inserted with "cd = SDL_CDOpen(0)"
cd->status is alway CD_TRAYEMPTY! I tested other cds but there was no
change.
He gets the right drive because SDL_CDEject(cd) opens the tray.
In the help is an exampel program that displays all the tracks on the cd. I
tested that but it doesn’t work, too.
Here is the example:
SDL_CD *cdrom;
int cur_track;
int min, sec, frame;
SDL_Init(SDL_INIT_CDROM);
atexit(SDL_Quit);
/* Check for CD drives /
if(!SDL_CDNumDrives()){
/ None found */
fprintf(stderr, “No CDROM devices available\n”);
exit(-1);
}
/* Open the default drive */
cdrom=SDL_CDOpen(0);
/* Did if open? Check if cdrom is NULL */
if(!cdrom){
fprintf(stderr, “Couldn’t open drive: %s\n”, SDL_GetError());
exit(-1);
}
Add the following line of code just after "cdrom = SDL_CDOpen( 0 )"
SDL_CDStatus( cdrom );
Hope it helps.
Mario de SousaOn Tue, 30 Dec 2003 17:14:50 +0100 “Dennis” <kurzer_14 at web.de> wrote:
Hallo everybody!
When I open my CD-Drive with a cd inserted with "cd = SDL_CDOpen(0)"
cd->status is alway CD_TRAYEMPTY! I tested other cds but there was no
change.
He gets the right drive because SDL_CDEject(cd) opens the tray.
In the help is an exampel program that displays all the tracks on the
cd. I
tested that but it doesn’t work, too.
Here is the example:
SDL_CD *cdrom;
int cur_track;
int min, sec, frame;
SDL_Init(SDL_INIT_CDROM);
atexit(SDL_Quit);
/* Check for CD drives /
if(!SDL_CDNumDrives()){
/ None found */
fprintf(stderr, “No CDROM devices available\n”);
exit(-1);
}
/* Open the default drive */
cdrom=SDL_CDOpen(0);
/* Did if open? Check if cdrom is NULL */
if(!cdrom){
fprintf(stderr, “Couldn’t open drive: %s\n”, SDL_GetError());
exit(-1);
}
Hi Mario!
Thanks a lot! I didn’t expect a solution so simple.
I should read the documentation more carefully.__
Greetings, DennisB http://borde.homeip.net/
“Mario de Sousa” schrieb im Newsbeitrag
news:20040102093748.4659f7b3.mcd at jhb.ucs.co.za…
Hey, Dennis.
Add the following line of code just after "cdrom = SDL_CDOpen( 0 )"
SDL_CDStatus( cdrom );
Hope it helps.
Mario de Sousa
On Tue, 30 Dec 2003 17:14:50 +0100 “Dennis” <@DennisB> wrote:
Hallo everybody!
When I open my CD-Drive with a cd inserted with "cd = SDL_CDOpen(0)"
cd->status is alway CD_TRAYEMPTY! I tested other cds but there was no
change.
He gets the right drive because SDL_CDEject(cd) opens the tray.
In the help is an exampel program that displays all the tracks on the
cd. I
tested that but it doesn’t work, too.
Here is the example:
SDL_CD *cdrom;
int cur_track;
int min, sec, frame;
SDL_Init(SDL_INIT_CDROM);
atexit(SDL_Quit);
/* Check for CD drives /
if(!SDL_CDNumDrives()){
/ None found */
fprintf(stderr, “No CDROM devices available\n”);
exit(-1);
}
/* Open the default drive */
cdrom=SDL_CDOpen(0);
/* Did if open? Check if cdrom is NULL */
if(!cdrom){
fprintf(stderr, “Couldn’t open drive: %s\n”, SDL_GetError());
exit(-1);
}
Mario de SousaOn Fri, 2 Jan 2004 13:18:16 +0100 “DennisB” <kurzer_14 at web.de> wrote:
Hi Mario!
Thanks a lot! I didn’t expect a solution so simple.
I should read the documentation more carefully.
__
Greetings, DennisB http://borde.homeip.net/
“Mario de Sousa” <@Mario_de_Sousa> schrieb im Newsbeitrag
news:20040102093748.4659f7b3.@Mario_de_Sousa…
Hey, Dennis.
Add the following line of code just after "cdrom = SDL_CDOpen( 0 )"
SDL_CDStatus( cdrom );
Hope it helps.
Mario de Sousa
On Tue, 30 Dec 2003 17:14:50 +0100 “Dennis” <kurzer_14 at web.de> wrote:
Hallo everybody!
When I open my CD-Drive with a cd inserted with "cd = SDL_CDOpen(0)"
cd->status is alway CD_TRAYEMPTY! I tested other cds but there was
no
change.
He gets the right drive because SDL_CDEject(cd) opens the tray.
In the help is an exampel program that displays all the tracks on
the
cd. I
tested that but it doesn’t work, too.
Here is the example:
SDL_CD *cdrom;
int cur_track;
int min, sec, frame;
SDL_Init(SDL_INIT_CDROM);
atexit(SDL_Quit);
/* Check for CD drives /
if(!SDL_CDNumDrives()){
/ None found */
fprintf(stderr, “No CDROM devices available\n”);
exit(-1);
}
/* Open the default drive */
cdrom=SDL_CDOpen(0);
/* Did if open? Check if cdrom is NULL */
if(!cdrom){
fprintf(stderr, “Couldn’t open drive: %s\n”, SDL_GetError());
exit(-1);
}