I believe you can. What you would do is store the samples into an array. I was trying to do this for to build a tone frequency recognizer. Once you have your sample in the array there should be a way to push the data back into the audio system.
So this is I believe you can.