'Mic' plug versus 'Line In' plug

Jul 27, 2013 at 7:00 PM
I cannot record by my 'Line-In' plug? I use Win 7 and this setup for my record-button:

private void button2_Click(object sender, EventArgs e)
    {
        if (SourceList.SelectedItems.Count == 0) return;

        int deviceNumber = SourceList.SelectedItems[0].Index;

        sourceStream = new NAudio.Wave.WaveIn();
        sourceStream.DeviceNumber = deviceNumber;
        sourceStream.WaveFormat = new NAudio.Wave.WaveFormat(44100, NAudio.Wave.WaveIn.GetCapabilities(deviceNumber).Channels);

        NAudio.Wave.WaveInProvider waveIn = new NAudio.Wave.WaveInProvider(sourceStream);

        waveOut = new NAudio.Wave.DirectSoundOut();
        waveOut.Init(waveIn);

        sourceStream.StartRecording();
        waveOut.Play();
    }
The setup has no trouble in recording while I am using the 'Microphone' plug???

For extra info I use a little mixer, that collects the audio from 4 small contact-surface microphones, and thereafter sends a signal that cannot be recieved by my 'Microphone' plug - still the Naudio should be able to recieve by the 'Line In' plug instead (one should think)

(As a side remark I have the old audio editing software of Cool Edit on my PC, that doesn't differ between the plugs and records effortsly by both plugs)
Coordinator
Jul 29, 2013 at 1:40 PM
Well it depends how your soundcard presents its inputs to Windows. Does it appear as a separate device or not? If not, then the mixer API would be needed to select the recording source.
Jul 30, 2013 at 3:05 PM
Coordinator
Jul 30, 2013 at 3:08 PM
the last one might be a good starting point, although NAudio already has a fairly comprehensive interop of the Mixer API, so you can use the code in NAudio
Jul 30, 2013 at 6:11 PM
ok - but I can't seem to find the right entry-point towards the documentation of that particular corner of Naudio. In case https://naudio.codeplex.com/documentation should lead me the way, which upper level topic should I read.
Is there another link/site for more in depth documentation on Naudio?
Coordinator
Aug 2, 2013 at 9:00 AM
The mixer API is a windows API, so the best place to read about it is MSDN. Once you know what functions you want to call, you can see how NAudio provides wrappers to those with the Mixer, and MixerSource classes.