I tried using the solution presented in a related question for redirecting my audio input to my output, but the problem is that there's a very noticeable lag. It's especially obvious to me because I have my keyboard's audio out hooked up to my soundcard's in, which is then redirected to a different audio out device on my computer. I'd say there's at least 1/8th sec lag introduced.
gst-launch pulsesrc ! pulsesink
nice -n -15 gst-launch pulsesrc ! pulsesink
does not help any.
Any alternative ways that might work better?
I would suggest looking up JACK for low-latency audio in Ubuntu (or any other Linux for that matter) It allows for the low level redirecting you're after, but you may have to force it to work...