Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6472659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:22:22+00:00 2026-05-25T06:22:22+00:00

I’ve been trying to use some code like the following to read current sound

  • 0

I’ve been trying to use some code like the following to read current sound from the mic

_Capture is a CaptureSource and _Encoder is a SimpleAudioEncoder (Custom class)

_Capture = new CaptureSource();
_Encoder = new SimpleAudioEncoder(this);
_Encoder.CaptureSource = _Capture;

if (_Capture != null)
{
    _Capture.AudioCaptureDevice = CaptureDeviceConfiguration.GetDefaultAudioCaptureDevice();
    CaptureDeviceConfiguration.GetDefaultAudioCaptureDevice();
    if (CaptureDeviceConfiguration.AllowedDeviceAccess || CaptureDeviceConfiguration.RequestDeviceAccess())
    {
        MessageBox.Show("_Capture.Start()");
        _Capture.Start();
    }
}

Definition of SimpleAudioEncoder

public class SimpleAudioEncoder : AudioSink
{
    public SimpleAudioEncoder() {

    }
    protected override void OnCaptureStarted()
    {

    }

    protected override void OnCaptureStopped()
    {

    }

    protected override void OnFormatChange(
    AudioFormat audioFormat) {

    }

    protected override void OnSamples(
    long sampleTimeInHundredNanoseconds,
    long sampleDurationInHundredNanoseconds,
    byte[] sampleData)
    {

    }
}

Im guessing that the sampleData byte[] array has the data I’m looking for but how can I use it to find the frequency of the sound?

It would be great if I could find a function like

public double GetFreq(byte[] data)

To use like

double hertz = GetFreq(sampleData)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:22:23+00:00Added an answer on May 25, 2026 at 6:22 am

    Establishing the frequency of the sound requires converting the signal from the time domain to the frequency domain. It will involve Fourier transforms and subsequent analysis of the output. It’s really not a job for anyone without a pretty thorough understanding of DSP techniques. If you have to ask, then you’re a long way from being able to implement this yourself. I’d recommend a third party library.

    This page gives a fairly good view from somebody new to frequency detection.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have some data like this: 1 2 3 4 5 9 2 6
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.