By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,119 Members | 2,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,119 IT Pros & Developers. It's quick & easy.

Read the contents of an audio CD, HELP! PLEASE!

P: n/a
Hello, I am trying to put together a Java system for playing audio CDs on a
large CD player, I have most of it working But entering all the data like
Artist, Title, track name, track length (seconds) is a real pain in the
butt. What I would like to do is write a java class that would extrack that
info from an audio CD placed in the computers CDROM drive. I have looked and
looked and looked and looked, but I can not find any exambles of how to read
an audio CD. I have found some C++ stuff but reducing the MSVC++ code to a
callable JNI API is also kicking my butt. I could do it with C code but I
can find any C code (Windows) either.

Does anyone have simple/reuseable code they are willing to share that can
just reads the contents of an audio CD? Or can anyone tell me how to do it?

In either Java or C or readable C++?

thanks in advance

jim s.
Nov 23 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
[cross-posting deleted]

jim shirreffs wrote:
Hello, I am trying to put together a Java system for playing audio CDs on a
large CD player, I have most of it working But entering all the data like
Artist, Title, track name, track length (seconds) is a real pain in the
butt. What I would like to do is write a java class that would extrack that
info from an audio CD placed in the computers CDROM drive. I have looked and
looked and looked and looked, but I can not find any exambles of how to read
an audio CD. I have found some C++ stuff but reducing the MSVC++ code to a
callable JNI API is also kicking my butt. I could do it with C code but I
can find any C code (Windows) either.

Does anyone have simple/reuseable code they are willing to share that can
just reads the contents of an audio CD? Or can anyone tell me how to do it?

In either Java or C or readable C++?

thanks in advance

jim s.


Off-topic in this newsgroup. See the FAQ
(http://www.parashift.com/c++-faq-lit....html#faq-5.9), and
try in comp.sources.wanted.

Cheers! --M

Nov 23 '05 #2

P: n/a
Sorry, thanks for the correction.

jim
"mlimber" <ml*****@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
[cross-posting deleted]

jim shirreffs wrote:
Hello, I am trying to put together a Java system for playing audio CDs on
a
large CD player, I have most of it working But entering all the data like
Artist, Title, track name, track length (seconds) is a real pain in the
butt. What I would like to do is write a java class that would extrack
that
info from an audio CD placed in the computers CDROM drive. I have looked
and
looked and looked and looked, but I can not find any exambles of how to
read
an audio CD. I have found some C++ stuff but reducing the MSVC++ code to
a
callable JNI API is also kicking my butt. I could do it with C code but I
can find any C code (Windows) either.

Does anyone have simple/reuseable code they are willing to share that can
just reads the contents of an audio CD? Or can anyone tell me how to do
it?

In either Java or C or readable C++?

thanks in advance

jim s.


Off-topic in this newsgroup. See the FAQ
(http://www.parashift.com/c++-faq-lit....html#faq-5.9), and
try in comp.sources.wanted.

Cheers! --M

Nov 23 '05 #3

P: n/a
On Wed, 23 Nov 2005 18:14:29 GMT, "jim shirreffs" <jp**@verizon.net>
wrote, quoted or indirectly quoted someone who said :
What I would like to do is write a java class that would extrack that
info from an audio CD placed in the computers CDROM drive.


There are also databases of that information. IIRC Roxio CD Creator
will access one of them to find that info for a track where it is
missing from the original CD.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Nov 23 '05 #4

P: n/a
Yes I have read alittle bit about them, I should investigate them a bit
more. But I know it is posible to just get the info from the CD, it is
maddening that thus far I can find any readable code to do it.

thanks for a good suggestion, that will be what I will do if I can't get any
help here.
jim s.

"Roedy Green" <my******************************@munged.invalid > wrote in
message news:uu********************************@4ax.com...
On Wed, 23 Nov 2005 18:14:29 GMT, "jim shirreffs" <jp**@verizon.net>
wrote, quoted or indirectly quoted someone who said :
What I would like to do is write a java class that would extrack that
info from an audio CD placed in the computers CDROM drive.


There are also databases of that information. IIRC Roxio CD Creator
will access one of them to find that info for a track where it is
missing from the original CD.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Nov 23 '05 #5

P: n/a
On Wed, 23 Nov 2005 18:14:29 GMT, "jim shirreffs" <jp**@verizon.net>
wrote, quoted or indirectly quoted someone who said :
Does anyone have simple/reuseable code they are willing to share that can
just reads the contents of an audio CD? Or can anyone tell me how to do it?

In either Java or C or readable C++?


IF you google java audio cd metadata you will get a ton of utilities
that can read the metadata, though I found none in Java. I suspect
this means your best route is to write the metadata grabber in C++
using some Windows library and a JNI hook.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Nov 23 '05 #6

P: n/a

"jim shirreffs" <jp**@verizon.net> wrote in message
news:9k2hf.1224$R42.1177@trnddc01...
Hello, I am trying to put together a Java system for playing audio CDs on
a
large CD player, I have most of it working But entering all the data like
Artist, Title, track name, track length (seconds) is a real pain in the
butt. What I would like to do is write a java class that would extrack
that
info from an audio CD placed in the computers CDROM drive. I have looked
and
looked and looked and looked, but I can not find any exambles of how to
read
an audio CD. I have found some C++ stuff but reducing the MSVC++ code to
a
callable JNI API is also kicking my butt. I could do it with C code but I
can find any C code (Windows) either.

Does anyone have simple/reuseable code they are willing to share that can
just reads the contents of an audio CD? Or can anyone tell me how to do
it?

In either Java or C or readable C++?


I can only give you high-level hints which might help you come up with
better Google queries to find sample code.

I can think of two places where this data is stored off the top of my
head. Some CDs have a "CD TEXT" meta data encoded on them which will include
the artist name, the album name, and track list. Some CD TEXT also contains
an album cover picture. The CD TEXT does not contain track length, AFAIK, as
that info can be determined from the TOC.

If the CD doesn't have CD TEXT metadata encoded on them, then you'll
have to rely on a centralized database. Different DBs have different APIs,
so you'll probably want to choose one, go to their site, and read the
documentation they have. One such site is http://www.freedb.org/

The idea is to uniquely identify the CD, send the id to the DB, and the
DB will return all the data it has (including artist name, album name, track
names and track lengths). Unfortunately, the id does NOT uniquely identify a
CD, so occasionally a DB will send back multiple results. It's a design
choice you have to make as to what to do in that scenario (pick the first
one? let the user pick one? etc.)

- Oliver
Nov 23 '05 #7

P: n/a
> IF you google java audio cd metadata you will get a ton of utilities
that can read the metadata, though I found none in Java.


Here is one:
"
Features of FreeMP3 Player:
(...)
- integrated CD audio metadata lookup
(...)

FreeMP3 Player is free software based on Zinf's excellent open source code
player (formerly Free*MP), released under the GPL. Download the latest
source code for FreeMP3 Player: FreeMP3Player-src.zip
"
http://www.freewirep2p.com/player.html

HTH.
Nov 23 '05 #8

P: n/a
Oops, my bad, it's C/C++...
Nov 23 '05 #9

P: n/a
Commercial one:
"
CD-Text Reader (via JNI)
US$: 79.90
http://cdtextreader.miik.com.ua/features.html
The trial version is fully functional and can be evaluated for unlimited
time. The only difference between trial and full versions is that the trial
version will display an about box each time the CD-Text Reader is
initialized.
"

If you can live with the nag...
Nov 23 '05 #10

P: n/a
I do not think that info is on the CD itself.
Stick an audio CD into your PC and just
see. You get TRACK 1, TRACK2, . . .
I rip some of the CDs I buy using CDex (freeware)
to make MP3 files. I have to use CDDB in that app
to get the info you seem to want. Not all CDs are in
that database. Those, I have to enter by hand.
Good luck.

Tom the Canuck.

"jim shirreffs" <jp**@verizon.net> wrote in message
news:9k2hf.1224$R42.1177@trnddc01...
Hello, I am trying to put together a Java system for playing audio CDs on a large CD player, I have most of it working But entering all the data like
Artist, Title, track name, track length (seconds) is a real pain in the
butt. What I would like to do is write a java class that would extrack that info from an audio CD placed in the computers CDROM drive. I have looked and looked and looked and looked, but I can not find any exambles of how to read an audio CD. I have found some C++ stuff but reducing the MSVC++ code to a callable JNI API is also kicking my butt. I could do it with C code but I
can find any C code (Windows) either.

Does anyone have simple/reuseable code they are willing to share that can
just reads the contents of an audio CD? Or can anyone tell me how to do it?
In either Java or C or readable C++?

thanks in advance

jim s.

Nov 26 '05 #11

P: n/a
http://en.wikipedia.org/wiki/CD-TEXT

"
CD-TEXT is a extension of the standard "Red Book" Compact Disc
specification, which allows track and album titles to be stored directly on
the disk. The specification was released in September 1996, and backed by
Sony. Support for CD Text is common, but not universal. Utilities exist to
automatically rip CD-TEXT data, and insert it into CDDB or FreeDB.
"
Nov 26 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.