For instance, like Karaoke. In case of synchronized recording and playing audio. It is possible to realized by using AVAudioEngine. All source code is here.

By using mixer node, you can add more inputs. Customize it yourself. Enjoy.

Check it out.