iRiver T10

Posted in Uncategorized on July 14th, 2006 by admin – 7 Comments

I bought a new MP3 player a few days ago. Its one of those Windows Media Player “Plays for sure” devices which uses Microsoft’s media transfer protocol. On Linux there is libmtp but I would much rather have a USB mass storage devices that I can copy files to and from on any computer. Luckily the iRiver lets you change to UMS (USB mass storage) through a firmware upgrade. Of course the firmware updater program requires a Windows XP machine with WMP 10 installed. Once the firmware update is complete, its back to Linux.

The main reason I bought this player is because it has long (45 hour) battery life and Ogg support. I wonder why iRiver makes the default firmware require WMP 10 when that terrible program doesn’t even support Ogg? I mean if someone was really going to make use of the Ogg support, they won’t be the kind of person who uses WMP.

One problem I had with the player — and all other UMS players is that you — can put files in folders, but within each folder the songs are not listed alphabetically. Instead they are listed in the order you copied them to the player (presumably is just grabs the lowest disk address first). This is a problem because now all my albums play in the wrong order, unless I meticulously add them in the correct order.

As a UMS, this iRiver T10 does not support any regular playlist formats. I’m pretty sure on Windows using MTP you can add playlists, but on Linux using UMS you’re kinda stuck. No m3u or pls or any other kind of XML. However it does have this “QuickList” feature which lets you hold down a button and add the currently playing song to a playlist, like the iPod’s “On-The-Go” playlist.

So after making one of these I got the idea that I could make playlists and put all my songs in the correct order. But that would mean using the T10 interface then stopping, plugging in and transferring the playlist data somewhere else on the drive so I could create another one. Instead I just opened the playlist up in my trusty hex editor and reverse engineered it.

Luckily the iRiver playlists (*.pla) are not difficult to understand. They have a 512 byte header, followed by the paths for each song relative to the root of the drive. Each path takes up 512 bytes (the ascii data followed by null characters). For some reason every second byte throughout the whole file is 0x00. Is this UTF-16 and I am just using non-complex characters?

Anyway, I put it all in a python script. To make a playlist of the entire folder in alphabetical order just do:

ls | ./iRiverPlaMaker.py MyPlaylist.pla

You should run this on the iRiver disk so all the paths are correct and correspond to the root of the disk.

Why I Love Libglade

Posted in Uncategorized on July 7th, 2006 by admin – 2 Comments

The family computer in the living room (of the house that I am now moving out of) was recently converted to an Ubuntu machine. For about the last three years I have been trying different ways to keep it running smoothly. The last configuration was Windows 2000 with a limited account and a software firewall, but even on dial-up, the spyware and the worms got to it.

This computer is mainly used by my younger sister and younger brother for homework and surfing the internet. The three most used programs are Word, MSN, and Limewire. So I thought this would be a perfect use case for Ubuntu — and it is. It’s working flawlessly so far, even with sleep, but that’s because it has apm not acpi.

Anyway I’m not here to tell you my Ubuntu success story since everyone knows how it ends; the computer never has to be reinstalled or rebooted ever again!

I’m here to tell you about why I love libglade. Everyone knows how it is good for creating GUIs, even though the interface sucks, and how it takes a lot of the work out of programming. But in my case it was the XML that saved the day since it is easily readable to humans and does not need to be compiled.

The above is a screenshot of gnome-ppp when it is connecting (like I said the computer uses dial-up). My younger sister will sit at the computer and think, “Oh, ‘Log’ as in ‘Log-on'”, and will click the log button. But instead it brings up a window showing the log of all the modem commands sent during the connect process. Now she is confused, and we don’t want the user to ever be confused.

For some reason she can’t remember not to click on this button. So I opened up the glade file using this command:

gedit `locate gnome-ppp.glade`

I then searched for the gtkButton with the text “_Log”, edited, saved, and voila!

This particular program has instantly become much more usable for her — something that could never be done on Windows or MacOSX. Score for open source!

Hello Planet Gstreamer

Posted in Uncategorized on June 30th, 2006 by admin – 1 Comment

As you can see, I am now on planet Gstreamer. I am another one of those Jokosher guys who also write about a lot of stuff which has nothing to do with Gstreamer. I’ll try my best to keep it interesting :).

So following GUADEC which I did not attend, and could not watch because of the semi-functional streams, Jokosher is entering its first feature freeze. This saturday (also Canada Day!) we are frozen. Which is bad since we have picked up momentum from the GUADEC demo and Jono putting in some real-world testing. But alas the freeze is good cause we have lots of bugs and we need to release soon to get more users onboard.

Jokosher has come to the point where I need to actually do some real C hacking and not just the Python stuff to fix the bugs. Maybe I’ll have time for this if I can finish cleaning up some code, hastily committed on wednesday trying desperately to make the freeze. Uug! I hate it when people mix tabs and spaces!

One Week Until…

Posted in Uncategorized on June 8th, 2006 by admin – Comments Off on One Week Until…

That’s this is the official reminder for all those who don’t know and those who don’t remember. In one week (that June 15th) it is my 19th birthday. After this event, I will be finally able to purchase alcohol and cigarettes, however I’m not sure I will exercise this right any time soon :).

I finally listened to that last LugRadio and was quite surprised to hear my name mentioned and Jono explain that I was a “Jokosher Hacker”. This of course was quickly followed by Matt making a few quips about how I was from “canadia” (sic), and whether I will be let “oot” of the country. I can’t really take this seriously coming from Matthew “the gnome” Revell. There’s an inside LugRadio joke for you :).

On the Jokosher front, I have now implemented exporting to ogg. This has not yet been committed to svn as I am still working on it, but you will be able to try it out before the end of the week. Next up will be a nice progress dialog, and exporting for mp3, wav and possibly flac.

Programmers writing documentation?

Posted in Uncategorized on June 5th, 2006 by admin – Comments Off on Programmers writing documentation?

I feel compelled to post an update although there isn’t much to say. Last Thursday, I lost power in my house for 24 hours, after the storm in Toronto. It was totally the fault of hydro one, cause we are always last to get our power back after an outage.

Needless to say having no power hampered my efforts at getting something done on Jokosher. And of course I couldn’t download the Ubuntu Dapper Drake CD until friday.

Over the weekend we made some good progress on Jokosher documentation. Jono put together a hacking guide, and I wrote a page about our file format. My goal (which I think I have achieved) is to have it detailed enough for someone else to implement some code that can read/convert our files for some other program. Although I’m not sure who else would want to use our files :). Many open source projects get bad press about having no documentation; hopefully if this keeps up Jokosher won’t.

Finally I have to post a link to this song (Kate by Sambassadeur) I got from one of my Jokosher friend’s blog. It is from a Swedish band, free to download, and definitely worth checking out.

Adder Bug: Act Two

Posted in Uncategorized on May 31st, 2006 by admin – Comments Off on Adder Bug: Act Two

In the first act Jono did an excellent job at tracking down, reporting and getting his bug in the adder fixed. This allowed Jokosher to stop and play more than once. Now prepare yourself for the continuation!

It was quite the puzzler. We could record audio, but not while something else was playing. So I decided to get my hands dirty and track it down. After looking through the neighbourhood, my prime suspect was the one with the history of problems: the adder. He is the best in the business at making non-linear pipelines, but sometimes things go wrong.

This time it was his pad. It wouldn’t remove itself when it was unlinked. Even worse was that there was no way to make him remove it. Time was running out. I had to put in a call to the Feds. Luckily they answered with a nice patch applied to CVS early this morning. Now we can remove all the pads we want to, no problem. The adder is under control. Laszlo saves the day once again.

Thanks to wtay in #gstreamer for fixing our problem so quickly, even though compilation problems prevented me from realizing it had been fixed until much later.

I have finally caved and actually got a dynamic bl…

Posted in Uncategorized on May 27th, 2006 by admin – 1 Comment

I have finally caved and actually got a dynamic blog. This means I no longer get to hand-write all the HTML, but now everyone can post comments, and get RSS feeds. I can actually see if I have an audience, and get some feedback.