Distinguishing CD's

Everything else that doesn't fall into one of the other PB categories.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Distinguishing CD's

Post by Killswitch »

If you use Window's Media Player, for example, it's possible for CD to be put in your draw and it will already have the CD's arist and track details. This makes me wonder - there must be something unquie about each CD to make it be recognised as X ablum by X artist.

I know that there isn't a native PB command to do this sort of thing with CD's but does anyone here know of a way you could get this information from a CD - if indeed it is actually on the CD it's self as WMP is connected to some online database right (at least it keeps updating it's track listing thingy).

Well in any case, any ideas?
~I see one problem with your reasoning: the fact is thats not a chicken~
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Distinguishing CD's

Post by PB »

As far as I know, for CDs the app reads the total length of all tracks, plus the
number of tracks itself. This results in a "checksum" that the app then reads
from an online database (usually CDDB.com). It's very rare for 2 x CDs to
have the same number of tracks and total playing length, which makes this
method of identifying a CD very popular and sensible.

As for DVDs, they definitely have a unique ID assigned to them, but I don't
know how to read it (never had need to). But I've used apps which can read
it (such as DVD Profiler).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

Oki doki, so in order to get it to work I'd need to have a database of 1000's of CD's? Don't think it's worth it really, do you? :P
~I see one problem with your reasoning: the fact is thats not a chicken~
aaron
Enthusiast
Enthusiast
Posts: 267
Joined: Mon Apr 19, 2004 3:04 am
Location: Canada
Contact:

Post by aaron »

You don't need to hold all the info for every CD locally... you can use an internet database like FREEDB http://www.freedb.org

From the FAQ:
******
1.1. What is freedb?
freedb is a database to look up CD information using the internet. This is done by a client (a freedb aware application) which calculates a (nearly) unique disc ID for a CD in your CD-Rom and then queries the database. As a result, the client displays the artist, CD-title, tracklist and some additional infos.
You can also search for CD-info in the freedb via the web-based search.
******

Once you've looked up a CD, then hold the track info locally in a file.

How is that for being worth it? :D
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> so in order to get it to work I'd need to have a database of 1000's of CD's?

Yep, which is why I mentioned CDDB.com -- that's what most apps use to get
CD data. However, this is a paid service. I wasn't aware of Aaron's service,
FreeDB, so this is obviously a much cheaper way of getting the data.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Post by Killswitch »

Ahh sorry mate, I didn't read your post properly as I was in my IT class (so boring, turst me if you do GNVQ ICT you'll know what I mean). But thanks very much I'll be looking into that right now!
~I see one problem with your reasoning: the fact is thats not a chicken~
Post Reply