Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting sound, MasterPeakValue and Windows default input #1188

Open
rserodioalbuquerque opened this issue Oct 10, 2024 · 0 comments
Open

Comments

@rserodioalbuquerque
Copy link

Hi Everyone,

I'm writing some pieces of code to detect whether or not there is sound from a microphone device.
I came up with a basic working solution that consists of

  1. WaveInEvent.StartRecording()
  2. Sampling the data and simply checking for device.AudioMeterInformation.MasterPeakValue

I found people reporting issues around MasterPeakValue being 0 unless they open "Recording Devices",

But after some testing I found that MasterPeakValue is reported correctly for any device, but it needs to be selected in Windows input manager as DEFAULT, otherwise it's 0.

capture

Is this a bug or should I be using a different approach for my use case? I don't want to be constrained by the default windows input.

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant