Skip to content

Detecting sound, MasterPeakValue and Windows default input #1188

Open
@rserodioalbuquerque

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions