Can Java read TOC cd?

M

Maarten

Hi,

Currently I am exploring the what I need to know to for creating a
program that can read the TOC of a audio/data cd and connect through
telnet or http to the Freedb cd database on the internet and get the
available information and after processing putting it in an MySQL
database. Java seems to be an interesting language to perform this job
as it is multi-platform. However, before I go learn this language only
to find out this might not the best language to write it in, I would
like to hear some opinions on this.

Thanks in advance, Maarten
 
G

GArlington

Hi,

Currently I am exploring the what I need to know to for creating a
program that can read the TOC of a audio/data cd and connect through
telnet or http to the Freedb cd database on the internet and get the
available information and after processing putting it in an MySQL
database. Java seems to be an interesting language to perform this job
as it is multi-platform. However, before I go learn this language only
to find out this might not the best language to write it in, I would
like to hear some opinions on this.

Thanks in advance, Maarten

ANY server side (scripting) language can do that for you...
So, you will have to decide if you are interested in learning Java,
instead of trying to compare it's ability to do this VERY simple task
to other languages.
 
L

Logan Shaw

GArlington said:
On Mar 16, 9:04 pm, Maarten <"maarten at custodis dot cistron dot nl">
wrote:
ANY server side (scripting) language can do that for you...

Huh? I took the question to mean that the original poster has
a CD-ROM drive, they want to insert an audio CD, and they want to
gather information about the audio tracks on the CD. This is a
pretty low-level function. It has to depend on the device driver
for the CD-ROM drive, and it may have to have some very specific
knowledge about the CD audio format (which is different than the
CD-ROM format; only the latter has a filesystem, for one thing).

Think of a TOC as sort of like a partition table, except that it
divides up a continuous series of audio frames into conceptual
tracks, and I think it uses seconds (rather than frames or
blocks or bytes) as its unit.

As I understand it, the usual way to do all this on a PC is to
speak ATAPI to the hardware. I don't know of a way to do this
directly from Java, although it could be possible.

Also, it sounds to me like this would all be done on the client
side, not the server side. The client needs to look at the low-level
info on the physical disc, then it needs to contact some service
on the network to gather more information about that disc, then
store that into a database somewhere. Java sounds great for the
second two of those, but the first one is another question.

- Logan
 
M

Maarten

Think of a TOC as sort of like a partition table, except that it
divides up a continuous series of audio frames into conceptual
tracks, and I think it uses seconds (rather than frames or
blocks or bytes) as its unit.

I have never seen the TOC of an audio-cd but since freedb/cddb both
display the start of each audio track as a frame-offset I guess it is
set in frames.

The TOC can set the track offset (the frame at which a track begins; 1
second is 75 frames), index point (subdivisions of a track), cd and
track information and whatever one would like to put in there.
As I understand it, the usual way to do all this on a PC is to
speak ATAPI to the hardware. I don't know of a way to do this
directly from Java, although it could be possible.

Most programs I've seen that copy cd's and convert them to wave or mp3
require an ASPI driver (ASPI stands for Advanced SCSI Programming
Interface. Originally developed by Adaptec. It is a software layer that
enables programs to communicate with SCSI (and ATAPI) devices.)
Also, it sounds to me like this would all be done on the client
side, not the server side. The client needs to look at the low-level
info on the physical disc, then it needs to contact some service
on the network to gather more information about that disc, then
store that into a database somewhere. Java sounds great for the
second two of those, but the first one is another question.

And that was indeed my question to begin with, though maybe not too
clear. I have never seen a Java program to copy audio CD's or do
something else with it and since I only have experience with PHP and
Javascript it requires me quite a bit to learn which is all right as
long as it leads to something.

Maarten
 
T

Tris Orendorff

Maarten <"maarten at custodis dot cistron dot nl"> burped up warm pablum in

Hi,

Currently I am exploring the what I need to know to for creating a
program that can read the TOC of a audio/data cd and connect through
telnet or http to the Freedb cd database on the internet and get the
available information and after processing putting it in an MySQL
database. Java seems to be an interesting language to perform this job
as it is multi-platform. However, before I go learn this language only
to find out this might not the best language to write it in, I would
like to hear some opinions on this.

Here's something from 2002:
http://forum.java.sun.com/thread.jspa?threadID=210561&messageID=1251678

--
Tris Orendorff
[ Anyone naming their child should spend a few minutes checking rhyming slang and dodgy
sounding names. Brad and Angelina failed to do this when naming their kid Shiloh Pitt. At some
point, someone at school is going to spoonerise her name.
Craig Stark ]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top