Thursday, June 29, 2006

wmamp: ogg and mp3 work again

It took about 30 minutes of poking around tonight and I had mp3s playing again, and then probably another 30 minutes and ogg was working. It turns out that my ogg problems had to do with the fact that mt-daapd was sending me ogg files as Content-Type "audio/ogg" but wmamp was expecting "application/ogg". A quick compile and ogg works. What I'm seeing now is that it keeps playing the same song over and over, rather than progressing to the next song in the album, so I expect I've broken something else.

I made another discovery today - apparently I've never needed libopendaap - some code was lifted from the project to allow wmamp to authentication to iTunes, but that's it. Looking at the code now, I'm not sure why wmamp doesn't just use libopendaap - it has more features (like supporting playlists), and it uses an mDNS client that's designed for embedded systems.

And speaking of embedded systems, the wmamp image includes telnetd so that you can log in to the wma11b and do stuff (like killing and restarting wmamp so you can watch all the debug output it dumps to stderr). I spent a little time poking around the filesystem, and I noticed that the root filesystem contains a copy of uClibc - an implementation of the standard libc that's designed to be small (for, say, embedded systems like this). At less than 200kB it may not contain everything I'd like, but the concept is solid. Conversely, the image that Linksys provides to download contains a version of glibc that's over 3MB. I don't even know how they got it that big - the one I have is only about 1.1MB. But why have two different versions of libc at all? The only thing I can think of is that they needed a libc to boot, but glibc wouldn't fit, so they had to use uClibc. For the main application though, it was probably easier to develop with glibc, and so they took the hit. I'm sure a lot more RAM could be freed for application use if we were using uClibc instead. I'm hoping to be able to pursue this, but the disk requirements might exceed what I have here (have I mentioned that I'm doing all my development on a 200MHz Pentium machine with 32MB of RAM and about 8GB of disk space?). Hope springs eternal - maybe I can make it fit. Then I just have to coerce all the stuff I've already cross-compiled into building again against uClibc. Yeah, that's all.

Labels: