none
Audio Loopback In MVC RRS feed

  • Question

  • Hi , 

    I am trying to create a wave file using microphone in MVC application (using NAudio) .For reference I followed the steps mentioned in  the https://www.youtube.com/watch?v=BjnTgIdTXwI

    Please find the block of code:

    public ActionResult TempButtonStart()
    {
    int deviceNumber = 0;

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

    NAudio.Wave.WaveInProvider waveInss = new NAudio.Wave.WaveInProvider(sourceStreamss);

    waveOutss = new NAudio.Wave.DirectSoundOut();
    waveOutss.Init(waveInss);

    sourceStreamss.StartRecording();
    waveOutss.Play();
    return View("Index");
    }

    The loopback sound is not working in MVC. 

    Please guide.

    Thanks,

    Shilpi

    • Moved by CoolDadTx Wednesday, May 16, 2018 2:13 PM ASP.NET related
    Wednesday, May 16, 2018 4:20 AM

All replies