简体   繁体   English

使用C#从音频CD导入数据?

[英]Importing Data from Audio CD using C#?

I am doing a music album library.The program should connect to a database like FreeDB and then store it. 我正在做一个音乐专辑库。该程序应该连接到像FreeDB这样的数据库,然后存储它。

At the moment, it is just a concept and I want to know if it is possible to do it. 目前,这只是一个概念,我想知道是否可以这样做。 The real question is, Is there a way to get the data from cd like what happens when you play a disc in Windows Media Player? 真正的问题是,有没有办法从CD获取数据,就像在Windows Media Player中播放光盘时所发生的那样? I did a bit of a reasearch and I found about ID3 and mp3 but I don't think it will be any lead as the tracks are .cda. 我做了一些研究,我发现了ID3和mp3,但我不认为它会有任何领先,因为曲目是.cda。

I am studying programing (diploma). 我正在学习编程(文凭)。 Any suggestions? 有什么建议?

我发现了一个包含示例代码的教程,可以帮助您: http//www.codeproject.com/KB/audio-video/freedb.aspx

If you want to write all of the code from scratch you will need to learn about Red Book . 如果您想从头开始编写所有代码,您需要了解Red Book Otherwise you may want to just automate something such as media player. 否则,您可能只想自动播放媒体播放器等内容。

The following is based on my vague memories of the incomplete description that the team behind that feature in the Windows 98 era provided. 以下内容基于我对Windows 98时代该功能背后的团队提供的不完整描述的模糊记忆。 The specifics of the implementation were confidential, and I wasn't privy to the details, and things may have changed quite a bit in the ensuing 13 or so years since I first experimented with this feature. 实施的具体细节是保密的,我对细节并不了解,自从我第一次尝试这个功能以来的13年左右的时间里,情况可能会发生很大的变化。

A representative sample of binary data from the CD was read in and converted into some sort of CRC-like checksum or a hash. 读入来自CD的二进制数据的代表性样本并将其转换为某种类似CRC的校验和或散列。 The checksum was sent to a web service that contained a database matching those checksums to the album information. 校验和被发送到一个Web服务,该服务包含与这些校验和匹配的数据库到相册信息。

When possible, the exact disk was matched; 如果可能,确切的磁盘匹配; apparently, there were just enough conflicts in my own collection that I was sometimes presented with a list of possible albums. 显然,在我自己的收藏中只有足够的冲突,我有时会看到可能的专辑列表。

Microsoft spent a fair amount of money building this database and the data included a partnership with at least one third party company. 微软花了相当多的钱建立这个数据库,数据包括与至少一家第三方公司的合作伙伴关系。 You can probably build a proof of concept fairly easily, but you probably won't be able to build out a complete database yourself. 您可以相当容易地构建概念证明,但您可能无法自己构建完整的数据库。 But you might be able to use something like FreeDb to build a custom service of your own. 但是,您可以使用像FreeDb这样的东西来构建自己的自定义服务。

An example of a similar approach is explained in modest detail here: http://en.wikipedia.org/wiki/CDDB 这里将详细解释类似方法的一个示例: http//en.wikipedia.org/wiki/CDDB

It's possible that newer CDs include some sort of distinct identifier, but I am not familiar with current CD industry standards. 新CD可能包含某种不同的标识符,但我不熟悉当前的CD行业标准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM