473,394 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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

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
11 3713
[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
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
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
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
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

"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
> 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
Oops, my bad, it's C/C++...
Nov 23 '05 #9
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jack Black | last post by:
Hi, all!! Trying to clear the contents of a frame (or iframe), and can't seem to find anything that works. Tried: * innerHTML * outerHTML * document.close(); (with a number of different frame...
3
by: John Chen | last post by:
I need to use iframe to create a floating frame. But the contents in the iframe is not a external html file. Rather, it will be dynamically created by jsp. How can I set the src attribute to a URL...
1
by: laredotornado | last post by:
Hello, I want to play an audio file embedded on my page by clicking on an audio image and the page change to a new page. Is there a cross-browser Javascript way to do this? Right now the code I...
0
by: laredotornado | last post by:
Hello, I want to play an audio file by clicking on an audio icon and not having the page switch out underneath. Right now the code I have is ... <html> <head> <title>Dictionary:...
2
by: ViperCB | last post by:
Hello from a newbie, I am trying to do some research on an upcoming project that involves reading in audio files of various formats and using the audio signal as a source of noise to generate...
1
by: Tito | last post by:
For an internet telephone application, I need to be able to read and write data to and from /dev/dsp simultaneously. I wrote some code and its not working. Anyone have any working code to do...
2
by: dba123 | last post by:
I need help in coding the following or if you can just point me in the right direction: 1) Reading the follwoing XML document 2) Hook up a GridView to the data received from the XML document. ...
3
by: Udhay | last post by:
Sir, I want to read the data of an audio file in c++ (Windows). What is the API which helps to read the data of an audio file. I want to read BitRate,Audio Sample Size,Audio Sample rate and...
1
by: Sebouh | last post by:
Hi guys. I need your help to solve this problem. You see, i need to get the samples from an audio stream, to do FFT analysis. I need to read those amplitudes and pass them to an analyzer so i can...
1
by: foolsbar | last post by:
Hi there, Is it possible to read a cookie's domain from the actual .txt file? I want to be able to iterate through all of the cookie files on the local file system, and find out which domain the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.