Itâ€™s Memorial Day weekend, so weâ€™re doing a little relaxing.
Whatâ€™s relaxing for me? Playing around with interesting random bits of code.
One piece of code thatâ€™s been interesting for a while, and very useful, is the iFetch program, which I use to download BBC Radio so that I can listen to it on my MP3 player on the bus. The iPlayer is nice, and all, but I canâ€™t access it without an Internet connection, and the bus doesnâ€™t have an Internet connection yet.
Lately, it seems like practically every show Iâ€™m fetching is coming down in WMA format. That wouldnâ€™t generally be so bad, except that the WMA format streams at real-time using MPlayer, whereas the other formats stream as fast as the Internet can send them.
Thereâ€™s a reason why I can only download WMAs now â€“ the BBC recently made the choice to keep to only those formats that they feel they can adequately add DRM to. Which seriously limits your options as to what devices you can play it on. (Does that iPad do Flash? No. Does it do WMA? No idea.)
I havenâ€™t yet figured out why thereâ€™s such a slowdown with WMAs in MPlayer, so if any readers have any ideas, please let me know.
Since I was unable to do much about the WMA slowness, I thought Iâ€™d look into what I can do about the MP3 files Iâ€™ve already collected â€“ organising them by genre, broadcast date, etc.
So I looked into what I can do with MP3 tags.
Windows comes with the Windows Media Format SDK, which I thought Iâ€™d use. Iâ€™ve previously used it to set various values such as Title, Author, etc. Todayâ€™s game was to try and expand on that a little. One thing I wanted to look into was the use of various date fields. Date of recording, date of encoding â€“ those seemed to be appropriate values.
The function to use is IWMHeaderInfo3::AddAttribute, but it just wouldnâ€™t work for me. First I tried to use the â€śID3/TDRCâ€ť tag. No dice. AddAttribute gives me error 0xc00d002b â€“ thatâ€™s NS_E_INVALID_REQUEST. So I tried ID3/TDEN â€“ again, c00d002b. That error is supposed to mean that I entered the wrong stream index â€“ but I used stream zero, which is supposed to mean â€śthis tag applies to the entire fileâ€ť.
Perhaps the function doesnâ€™t accept the ID3 tag names, and only accepts the WMA tag names, even though this is strictly an MP3 file that Iâ€™m working with.
Next to try is WM/EncodingTime, which is supposed to translate to ID3/TDEN. No longer do I get NS_E_INVALID_REQUEST. No, this time I get 0xc00d0bd7 â€“ NS_E_ATTRIBUTE_NOT_ALLOWED. Why not allowed? No idea. Perhaps the WMF SDK (WTF SDK, sometimes) thinks that the EncodingTime should only be set by the process that does the encoding? I kind of disagree with that, and clearly because I have so many files without the EncodingTime value set, itâ€™s not the case that it gets set by the encoding tool. I tried various different settings â€“ as a string, as a QWORD, even as binary, and didnâ€™t really get anywhere.
Again, does anyone know how this should work?
Finally, whatâ€™s new to complain about on the Zune?
Not much â€“ I still really really like the device itself. A couple of minor issues that I am sure Microsoft could fix if they werenâ€™t so busy getting rid of the people in charge of the Zune: