question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting error InvalidParameter calling waveInOpen

See original GitHub issue

Getting this error every time calling WaveInEvent.StartRecording. Method MMDeviceEnumerator.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.Active) returns info about my microphone. Method WaveInEvent.GetCapabilities(0) returns 2 channels with many SupportedWaveFormat. This issue is not direct related to NAudio, tried my code with DllImport - same result. Can anybody help me? Windows 7 SP1 x64

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
skaacommented, Sep 1, 2021

Nо solution found. In my case the reason was - Kaspersky antivirus on operator PC, so i have added additional message to error handler. Sample code:

catch (Exception ex)
{
    string msg = "Error when starting recording";
    var mmex = ex as NAudio.MmException;
    if (mmex != null && mmex.Result == NAudio.MmResult.InvalidParameter && mmex.Message.IndexOf("waveInOpen") > -1)
        msg += "warning about AV software";
    _logger.Error(ex, msg);
}

Sorry for issue closing without comment.

0reactions
omid-94commented, Aug 21, 2021

Why this issue is closed? It’s solved? What was the solution?

I was looking for an answer too 😄 😆

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolved: InvalidParameter calling waveInOpen - Windows
when selecting my microphone in AFV settings, I get the following error... InvalidParameter calling waveInOpen unable to run stand alone ...
Read more >
c# - InvalidParameter calling waveOutOpen
1 Answer. I have found the problem. Issue was that I was using the WaveFormat from the Mp3Frame, rather than the WaveFormat provided...
Read more >
I have problem with waveinopen function which cause ...
I have a problem with the waveinopen function. The function returns the. MMRESULT_ERROR 11( "invalid Parameter passed ").
Read more >
waveInOpen function (mmeapi.h) - Win32 apps
The waveInOpen function opens the given waveform-audio input device for recording.
Read more >
Kinovea 0.9.1 crash: UnspecifiedError calling waveInOpen ...
The logfile shows no error. Workaround 1: Enable access to the microphone (in Windows-Settings-Privacy-Microphone). Workaround 2: Disabling the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found