I had always used Cakewalk for a compositing system on the Wintel platform.
Having moved to the Mac platform, I find myself using Garageband, because it's there.
Here is the link to the Apple SDK for preparing audio loops for Garageband.
http://developer.apple.com/sdk/