Too Busy For Words - the PaulWay Blog

Sat 13th Jan, 2007

Getting ready for LCA 2007 the hard way

Today I spent a good deal of time getting ready for LCA 2007. Of course, the easy bits were packing my clothes and spending time with Kate. The involved bit was getting ready should I be asked to do any DJing for the Roundhouse party.

Aside: I still don't know if I'm actually going to be doing anything more than spectating. The last two years I've mixed it up, and the curious electrophile can download them from different format, and while I'd still like to play I think the programme looks great as it is. Given that I've just downloaded $120 worth of Magnatune electronica with the Creative Commons Attribution-NonCommercial-Sharealike license with the express intent of creating a mix with the same license that people at LCA can now truly share and enjoy, it'd be kind of nice to do a set, though. If I don't do it at the Roundhouse, I'll mix it up one night and make it available during the conference.

The thorn in my side is that MixMeister, the software that I use to put together these mixes, is a proprietary, closed-source application that runs on the world's most illegally copied proprietary, closed-source operating system. Some day I will be able to use fully open source tools to make my mixes, but no open source tools I've seen have come within a tenth of its usability and features. My plan for this year was to have it running under WINE, so that at least the more obnoxious of the proprietary, closed-source shackles could be thrown off. But, though it installs and starts beautifully with the standard install of WINE under Fedora Core 6, once you load any music it basically hits a missing syscall in WINE. In fact, there's an entire missing subsystem - the ability for applications to register callback functions that can watch the status of another thread's IO. MixMeister has one thread scanning any new tunes for key signature and beats per minute, and the display thread watches this and tells you how far it's got.

The curious thing was that I found a patch set that would add all of this functionality. (Believe me, it was pretty extensive). However, it was written in 2003 and by the time it was reviewed it wouldn't sync with the current source tree. So they left it unpatched. For a project of WINE's size and stature, this seems pretty bizarre. Obviously, they were waiting for some muggins with some burning desire to get this functionality working to sit down and do all the manual editing to add the code and change it to use the newer function names and so forth.

Muggins being me, of course.

So, this morning I sat down, unrolled the source, and started wading through with a text editor manually applying the patches. Several times I had to do a lot of digging, as some function or structure would have changed and now no longer be recognised. Since up until now I wouldn't know a TEB structure from a ULONG_PTR, this was ... amusing. Still, the thought that at the end of it I would have a working MixMeister in Linux kept me going.

And I think that not really knowing the WINE gestalt actually made it easier. If something wasn't recognised, I'd just look for other references to the same thing. grep -r wait_fd * may be a blunt instrument, but with a bit of persistence you'll usually find a working example and keep on going. There were only two points at which I just commented something out, and in my reading of the source code I think it makes sense. I've flagged it and I'll watch what happens when I submit the patchball.

In the process, I found out about the neat bug in make -j 2 which causes compiles of complex things like WINE to not work correctly because of strange build parallelism issues which don't get resolved correctly. I spent 15 minutes trying to work out why all of the compiled tools were missing. I should try make -j 3 and see if it resolves itself.

Anyway, I've applied most of the patch to git, and I need to add two files to have the whole thing complete. Of course, just like my GEdit patch, I can't test it. This time, it's because the WINE packages in Fedora Core 6 provide some bits and pieces which the WINE 'source-compiled' environment doesn't pick up. So it can't find the WMVCore.DLL when I run the patched version, and it works but doesn't have the patches when I run it with the unpatched version.

*sigh*

So I reformatted my portable drive as a FAT drive so that my copy of the proprietary, closed-source operating system that came with my laptop can see it as well as Linux, copied all my music files back onto it (37GB worth), packed my passport and my key list for the key signing, took the necessary sedatives to ensure a good night's sleep, and prepared for the new tomorrow.

Last updated: | path: personal | permanent link to this entry


All posts licensed under the CC-BY-NC license. Author Paul Wayper.


Main index / tbfw/ - © 2004-2016 Paul Wayper
Valid HTML5 Valid CSS!