Help get CD info

Blitz3D Forums/Blitz3D Programming/Help get CD info

Guy Fawkes(Posted 2009) [#1]
I'm having a bit of some trouble w/ these few commands.

I need to know how I can ALWAYS detect the CD AND DVD drive of ANY PC, using bass_cd.

I also need it to detect if both a CDR / CDRW / OR DVD-R / DVD-RW / DVD-R+ / etc, is in the drive.

If not, then return "Please insert a CD into drive blah".

here's what I have so far:



Thanks to everyone who helps! :)

~DS~


Abrexxes(Posted 2009) [#2]
DSW, sorry , but your code lines are 100% bullshit ;)

I will write some helpfunctions in ... 3-4 weeks. At the moment, you can use the original api, but if BASS ask for a DWORD you can not return a STring. And a pointer to a structur is not a FLAG. ^^ The C++ lines that you copied there was 2 commands, you can not mix that.
BASS_CD_GetInfo(0,&info);
if (info.rwflags&BASS_CD_RWFLAG_READCDR) {
    // it can read CDRs!
}


door = BASS_CD_Door(0, BASS_CD_DOOR_OPEN) ;first drive
door = BASS_CD_Door(1, BASS_CD_DOOR_OPEN) ;second drive etc


Guy Fawkes(Posted 2009) [#3]
Anyone else since Abrexxes thinks my coding is bulls***? :P


Guy Fawkes(Posted 2009) [#4]
ok, im REALLY tired of you guys making fun of me b/c i dont code as well as most of you do. well you know what? im gonna let ALL of you know that i learn twice as fast as all of you do so back the hell off. i am NOT having a bad day so that was a VERY BAD move to make..


Abrexxes(Posted 2009) [#5]
oO

There are 3 thinks that you can do.

A) Learn that a DWORD is not a string etc
B) Buy a barbie and stop with programing
C) Make other thinks and wait for a "ReadyToGo" version of BBS with your stuff (BASS_OpenCDDriveOneAndPlayTheThirdSongFromBeginningWithoutShuffle(now#)

You know, we have here no fulltime job. ;)


John Blackledge(Posted 2009) [#6]
Abrexxes, allow me:

DSW we're all pretty much fed up of your attitude, and your misplaced aggression.

You'll have noticed that recently I have had long discussions with Abrexxes over the 3D sound in Bass.
Abrexxes could see that I was trying hard to get my code working, and only appealing to him when I had tried everything possible.
In turn, I respected Abrexxes' massive amount of work on this lib (-that he gave away free!) and treated him with respect.

If you remember from one of my earlier posts:

The man below replies: "You must be a manager."
"I am," says the balloonist, "but how did you know?"
"Well," says the man below, "you don't know where you are, or where you are going. You have made a promise which you have no idea how to keep, and you expect me to solve your problem.
The fact is that you are in exactly the same position as you were before we met.
- But now somehow it's my fault."


I love this community - my stuff looks great due to the efforts of many people on this forum.
And I, in turn, have now written 5 tutorials.
The web allows us to share our work, but requires shared respect.

You're coming across like a petulant 11 year-old.
Time to change, or stop programming.


Mahan(Posted 2009) [#7]
DSW wrote:
im gonna let ALL of you know that i learn twice as fast as all of you do so ...



Now let me quote you from an older post(http://blitzmax.com/Community/posts.php?topic=82669#933863):


Attention Deficit Disorder: It means I learn twice as slow as everyone else, but am also a genius. and it means i have a short temper. say as u wish all, but thats what it means, Malice.



So how's it gonna be? Twice as slow? Twice as fast?

You know what? I think you can learn programming about as fast as anyone else if you are motivated. The problem (as I feel it as an observer) is that:

1.) You often don't wanna learn, just get it done. (get others to write the code if possible)
2.) You aim way to high for what your current skills allow, and you get frustrated when you don't reach results. Obviously you still have problems with basic matters like variable scoping and datatypes and by-reference vs. by-value, procedural programming etc. but still you wanna make "professional products" that sell.

This is a friendly community and you can learn a lot here but your not gonna learn very much if you continue like this:


...back the hell off. i am NOT having a bad day so that was a VERY BAD move to make..



If you take on small beginner projects (and maybe start posting beginner questions in the beginner area too) you will get successful results and you'll start to grow you knowledge to take on larger and more complex projects as you learn more. This will probably give you an feeling of accomplishment that is much worth to keep going on.