Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: 'Mic' plug versus 'Line In' plug

$
0
0
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)

Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>