I am going to hope and assume you are doing this for stuff like video game let's plays or trying to capture sound from websites (Flash or other interactive sites)
I was able to do it with OBS. However, I had to download iShowU to help with capturing audio on desktop because it seemed to only pick up microphone audio. iShowU also works with Quicktime screen recording.