473,657 Members | 2,612 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6843
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 .PositionInSeco nds));
}
firstLastSum = CDTOC.track(0). PositionInSecon ds;
firstLastSum = (firstLastSum - CDTOC.leadOut.P ositionInSecond s);
return (ShiftRight((to cSum && 255), 24)
| (ShiftRight(fir stLastSum, 8) | CDTOC.NumTracks ));
}

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

Thanks,
J
--------------------
From: "Quina" <ca*********@gm ail.com>
Newsgroups: microsoft.publi c.dotnet.langua ges.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************ **********@v46g 2000cwv.googleg roups.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**********@go ogle.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**********@go ogle.com
Injection-Info: v46g2000cwv.goo glegroups.com; posting-host=82.154.40. 137;
posting-account=l4wRMQ0 AAAAZ3HcbFX3kUl CiDa5heVG2
Path: TK2MSFTNGXA03.p hx.gbl!TK2MSFTN GXA01.phx.gbl!T K2MSFTFEED01.ph x.gbl!TK2MSFTNG P
08.phx.gbl!news feed00.sul.t-online.de!t-online.de!news. glorb.com!postn ews.go
ogle.com!v46g20 00cwv.googlegro ups.com!not-for-mailXref: TK2MSFTNGXA03.p hx.gbl microsoft.publi c.dotnet.langua ges.csharp:3902 35
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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\ans icpg1252\deff0\ deflang1033{\fo nttbl{\f0\fnil\ fprq2\fcharset0
MS Sans Serif;}{\f1\fsw iss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2500;}\ viewkind4\uc1\p ard\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*****@microso ft.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
1374
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 application cannot be found. Python is complaining about mci.dll. It is surely finding it because it is in the search path, so I presume that there is something wrong with the dll. Any suggestions? Can Python import a file with a dll...
0
1560
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 database driven website that stores images as blob files. I specify the mime types and limit the file sizes to 15k. I can retreive the images using Windows, and Mac OS 9, but explorer
3
2404
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 is : Seller_id Product_id Total date_s 1 2 10 20/05/04 2 4 15 12/05/04 3 5 22 06/06/04 1 5 18 07/06/04
4
3268
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 program is doing I show a window which contains a progress bar and a label. At some point during the execution the state of the calculation is changed, so I want to let the user know this. I have placed the creation of the form in a seperate thread...
0
1201
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 the 'category'. Anyone know how I can get this??? It's fine for a free text search, but not when you've calculated the ID from a physical CD!
1
10127
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 authentication or the windows based authentication mode. If the administrator sets the application authentication mode to windows based, then the application has to verify the windows logged in username and password and then allow the user to use...
3
3544
by: rzaleski | last post by:
Does anyone know how to access freeDB (http://www.freedb.org) from VB.NET?
3
1458
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> </Root> I would like to retreive "\Root\Customer\Name" out of it. Something like:
2
4385
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
8823
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.