How to switch audio input device

Hello, I am trying to switch audio capture device. I have no idea how to do this.

Maybe there are some plugins for this or some sample code?