Not quite Graphics & Gaming, but kinda in the same field

I'm looking for an mci string or API call which will allow me to set the recording source for the computer's sound card. Ideally I'd like to toggle between the line-in devce and cd-audio device.

Any help would be appreciated.