473,387 Members | 1,700 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,387 software developers and data experts.

freeDB discID Calculation - retreive the TOC

Hi there, i'm building an windows application to manage my disc
collection. I also want to enable it with cd recognition features on
audio CDs. In order to do this I must submit the CD info (discID, ...)
to freedb.org.
The problem is that I don't know how to retrieve the Table Of Contents
(toc) from the disc. The information provided by freedb tells how to
calculate the DiscID, based on the toc, but it doesn't explain how to
get the Toc... there anyone who can help me how to do this?

Thank you in advance,
João Carias

Mar 6 '06 #1
2 6826
João Carias,

Go to: http://www.vbaccelerator.com/article.asp?id=3489

I converted the primary Function from VB.Net to C# below:
Try this:

long DiscID() {
tocSum = 0;
foreach (track in CDTOC) {
tocSum = (tocSum + AddDigits(track.PositionInSeconds));
}
firstLastSum = CDTOC.track(0).PositionInSeconds;
firstLastSum = (firstLastSum - CDTOC.leadOut.PositionInSeconds);
return (ShiftRight((tocSum && 255), 24)
| (ShiftRight(firstLastSum, 8) | CDTOC.NumTracks));
}

void AddDigits(void position) {
addDigits = 0;
while ((position > 0)) {
addDigits = (addDigits
+ (position % 10));
position = (position / 10);
}
}

Thanks,
J
--------------------
From: "Quina" <ca*********@gmail.com>
Newsgroups: microsoft.public.dotnet.languages.csharp
Subject: freeDB discID Calculation - retreive the TOC
Date: 6 Mar 2006 10:05:08 -0800
Organization: http://groups.google.com
Lines: 12
Message-ID: <11**********************@v46g2000cwv.googlegroups .com>
NNTP-Posting-Host: 82.154.40.137
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1141668319 14850 127.0.0.1 (6 Mar 2006 18:05:19 GMT)X-Complaints-To: gr**********@google.com
NNTP-Posting-Date: Mon, 6 Mar 2006 18:05:19 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NET CLR 2.0.50727),gzip(gfe),gzip(gfe)Complaints-To: gr**********@google.com
Injection-Info: v46g2000cwv.googlegroups.com; posting-host=82.154.40.137;
posting-account=l4wRMQ0AAAAZ3HcbFX3kUlCiDa5heVG2
Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TFEED01.phx.gbl!TK2MSFTNGP
08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!news.glorb.com!postnews.go
ogle.com!v46g2000cwv.googlegroups.com!not-for-mailXref: TK2MSFTNGXA03.phx.gbl microsoft.public.dotnet.languages.csharp:390235
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Hi there, i'm building an windows application to manage my disc
collection. I also want to enable it with cd recognition features on
audio CDs. In order to do this I must submit the CD info (discID, ...)
to freedb.org.
The problem is that I don't know how to retrieve the Table Of Contents
(toc) from the disc. The information provided by freedb tells how to
calculate the DiscID, based on the toc, but it doesn't explain how to
get the Toc... there anyone who can help me how to do this?
Thank you in advance,
João Carias


{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fprq2\fcharset0
MS Sans Serif;}{\f1\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\f0\fs20 Cheers,\par
\par
johnKn [MS-SDK]\par
\par
\par
\par
-Please do not send email directly to this alias. This alias is for \par
newsgroup purposes only\par
\par
-This posting is provided "AS IS" with no warranties, and confers no
rights.\par
\par
-To provide additional feedback about your community experience please send
\par
e-mail to: sd*****@microsoft.com\par
\f1\par
}

Mar 6 '06 #2
Thank you for your help. I appreciate the functions you provided, but
as I said in the original message my problem is on getting the TOC. I
followed the link you sugested and, once again, I've found things like
MCI and ASPI.
Can you please help me with ASPI providing some sort of walkthru to use
it on Visual Studio 2005 (C#)?
I already have downloaded ASPI... but I don't know how to use it on the
code.
I'm new in VS and I'm not very familiar whit the use of external
libraries...

Thank you again,

João Carias

Mar 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jeffrey Barish | last post by:
Has anyone gotten DiscID (and CDDB) to work on Windows? I installed python2.4 and CDDB-1.4 on Win98SE. When I import DiscID I get DLL load failed: One of the library files needed to run this...
0
by: Lee | last post by:
Hello, This is a genral enquiry before I send out a more detailed request. I am unable to retreive image files from a mysql database using IE 5.2 on the mac OS X platform. I have built a...
3
by: Not4u | last post by:
I would like to know which products are my best sells by sellers, but i would like to retreive this info by product id, seller id and the total amount of sells for this product. My Sells table...
4
by: Michiel Alsters | last post by:
Hello everybody, I hope anybody can help me. I'll try to give a brief overview of my problem. I have running a program that performs a heavy calculation. To give the user feedback what the...
0
by: John | last post by:
I'm trying to use the freedb.org XML Web Service interface at http://dev.systinet.com/code_samples/demos/freedb Works well, but I can't search for a specific CD using the discID along, I need...
1
by: Sudhakara.T.P. | last post by:
Hi, I have an application in VB.NET windows application, wherein the administrator has the option to change the authentication mode ie., whether the application should work as a normal database...
3
by: rzaleski | last post by:
Does anyone know how to access freeDB (http://www.freedb.org) from VB.NET?
3
by: Goran Djuranovic | last post by:
Hi All, Does anyone know how to retreive deepest XPath value from XML document by using VB.NET? For example, if I had an XML file like this: <Root> <Customer> <Name>MyName</Name> </Customer>...
2
by: bubba | last post by:
Has anyone coded a VBA module to access CDDB or freeDB to retrieve album/song info into a music database. Thanks.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.