if you decide to have your own interface for playing music, one of the fundamental decisions is how to manage your library of mp3/wma files. do you use the existing library of another program (such as microsoft?windows media?player), or do you write your own? this is not a particularly easy decision, and i am still not completely sure which is the best choice, but i had to make a decision or i would never be able to move on in my development. i decided that using a database to create my own library/catalog of music files would be the most flexible option, although this path would likely require more work at the beginning. i set up a new database in msde on my development machine, and created the following schema (actually it is a fair bit more complicated, but these are the key tables): 【推荐阅读:基本概念的澄清】
reading the tags 【扩展信息:基于.net的自动代码机】of course, after building my own system, along came what is arguably a much better one in the form of windows xp media center edition, which created a bit of a conflict in my mind. why continue building my own if i could go get a better one that is completely done for me? the confusion only lasted a few moments though; i am a programmer, so i often build things when it would be much more logical to buy them.
although i didnt have any formal requirements or architectural documentation (maybe its just me, but having to produce all the same documentation as a work project would take some of the fun out of it), i knew that moving to the next stage would require code that could read all of the attributes from an audio file梐rtist, song, and album names, for example.
i originally assumed my collection would be in mp3 files, which store attributes using various flavors of a system called "id3," so using the resources available at www.id3.org, i started creating a microsoft windows .net framework-based library that could handle the more common versions of id3 tags. in parallel, i began ripping my cd collection onto my hard drive (for my own personal use, of course). for this, i used windows media player, and i spent some time investigating the various options available in terms of wma (windows media audio) versus mp3 and different encoding rates.
... 下一页