Computing a hash code on for an Audio CD

  • Thread starter Thread starter Philip Niznik
  • Start date Start date
P

Philip Niznik

Hi All,
This may be a framework question rather than specific to c#, but does
anyone know the best approach to computing a hashcode for an audio CD
(so I can check if the content of one cd is equal or different to
another) ?
I guess the first thing I need to be able to do is get access to the
CD audio data so that I can get a inputstream for hashing? At the
moment I can't see any classes that understand how to access audio
CD's?
Thanks,
Phill
 
Philip said:
Hi All,
This may be a framework question rather than specific to c#, but does
anyone know the best approach to computing a hashcode for an audio CD
(so I can check if the content of one cd is equal or different to
another) ?
I guess the first thing I need to be able to do is get access to the
CD audio data so that I can get a inputstream for hashing? At the
moment I can't see any classes that understand how to access audio
CD's?

You mean, like for CDDB queries?
http://www.codeproject.com/cs/media/freedb.asp

Chris.
 
First, I think you may be referring to a CRC32 computation rather than a
"hash code". CRC32 is used to verify such data.
You would have to use one of the supplied DirectXAudio or other classes
that are available in the DirectX SDK.

Thanks Peter, yes really I mean CRC32. Thanks for the pointer -
DirectX it is then.
 
Philip Niznik wrote:
You mean, like for CDDB queries?http://www.codeproject.com/cs/media/freedb.asp

Chris.

Thanks Chris, interesting. On first looks it appears to look at the
meta data from the cda files rather than the actual content. I need
something that looks to see if the actual content is the same. Will dl
and have a good look over this though just in case.
 
Thanks Chris, interesting. On first looks it appears to look at the
meta data from the cda files rather than the actual content. I need
something that looks to see if the actual content is the same. Will dl
and have a good look over this though just in case.

some interesting use of win32 calls, but from what I can see does read
the track content only (I am sure could be adapted, but being lazy, I
don't really want to have to understand cd audio format if at all
possible)
 

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

Back
Top