Thursday, April 29, 2004

Audible.com is evil.

I spent 3 hours last night getting my old Diamond Rio 500 working for my wife to use. She likes books on tape, so I thought to myself "self, I think the rio 500 is compatible with Audible." I also remember thinking that the audible.com software sucked when I got the rio in 1999, so, maybe it's better now.

Nope.

You have to be an adminstrator to use it, not just to install it. If you're not, it fails in misleading or silent ways.

You can't have an adminstrator install it and then have a non-administrator use it. It fails in silent or misleading ways. The audible.com FAQ on this starts out with "fire up regedit".

It's evil.

If protected audio is going to be this hard, the RIAA has a lot to worry about.

Tuesday, April 06, 2004

Mach, Darwin, Semaphores, Mutexes, etc...

Very frustrating week.
I've been working on bringing up the ixmatch engine on OS/X 10.3. Which, by itself, would be a pretty cool project. I had lots of cruft in linux-dependant makefiles to clean up and code to rearrange, all of which was expected. After a couple days of learning XCode, I was able to get it all brought in and building.
Then the fun started.
The engine uses the POSIX sem_wait(3) and sem_signal(3) calls. Mac OS/X defines these, but they return 78 - which is errno-ese for Function Not Implemented. Oh joy.
So, I think to myself "self, you're porting to a mach-based OS. Remember all the fun of coding for NeXTStep? This is a real os core, there are happy little mutex, semaphore, and rwlock primitives hiding down there - go look in /usr/include/mach."

So I do. And there's no mutexes in there. WTF?

So, I go off to start implementing stuff using pthreads, which looked OK. pthreads has mutexes. But no semaphores. It has condition variables, but not semaphores, and condition variables don't look to be as useful as semaphores. Another wasted day of research and prototyping.

Turns out that OS/X does expose semaphores in /usr/include/mach (but not mutexes), and I can do a mutex with a semaphore, which is what I ended up doing, after some long and tedious detours into Kernel.framework and IOKit.framework, none of which was very happy. I also looked at the SysV semaphore set stuff which has been added to darwin, which just looked confusing.