Thursday, July 06, 2006

Closer and Closer to Something I Can Use

Only minor improvements to wmamp in the last couple of days. I tracked down a longstanding deadlock issue: pausing a song then returning to the song list and pressing SELECT on any song would kill playback until wmamp will killed and restarted. It turns out that when paused it was looking only for a return to play, and so wasn't handling the situation when you then tried to kill the current play list and load a new one. It was an interesting bug to track down, and I wasn't even in front of the computer while I did it. I've had this happen to me before, it's like I soak up all the information and the while I'm doing something else (like watching Starship Operators) my subconscious finds the answer for me. When the source of the bug popped into my head I just knew it was right, I knew exactly where to look for it and I knew exactly how to fix it. The first time it ever happened I was driving home from work and I almost turned around to go and prove to myself that I've solved the problem.

I also tracked down a new problem I'd only started seeing once I was able to access all the songs on my server - sometimes I'd select a song from the list and it would play, and sometimes the wrong song (but always the same wrong song) would play. It turns out that wmamp was limited to handling 30 songs in a playlist. That's not unreasonable when they're all coming from the same album (as they would have in the past), but it's no longer true with my changes. For now I've upped the limit to 100, but in the long term I have to figure out how to do "browsing", which I'm hoping means querying the DAAP server for songs based on some provided criteria. I wasn't sure if mt-daapd supported it, but from what I've been reading on the project's page it does. Now I just have to figure out how to browse. Thus far I've not been having a lot of luck getting low-level protocol details except through reading source code. Not that I have problem reading source code - working source ultimately tells you what's really happening, but it's not always the easiest to understand.

Labels: