You can do that with AULab, and some audio routing software. I used to use SoundFlower, but it looks like the previously mentioned Blackhole will do the same thing for free. AULab is free and pretty powerful, It's most of the engine behind Garageband and Logic, but stripped WAY down.