Soundflower is a MacOS system extension that allows applications to pass audio to other applications. Soundflower is easy to use, it simply presents itself as an audio device, allowing any audio application to send and receive audio with no other support needed.
Example: Play a YouTube video, and use Soundflower to route the audio signal into recording software such as Audacity.
Initially supported and developed by Cycling '74, the project now lives on Google Code where is has received updates from members there.
Although the code is maintained on Google Code, you can read about some sample applications on this page at Cycling '74: http://cycling74.com/products/soundflower/