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 183929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:12:09+00:00 2026-05-11T15:12:09+00:00

I am trying to detect when the user is blowing into the mic of

  • 0

I am trying to detect when the user is blowing into the mic of an iPhone. Right now I am using the SCListener class from Stephen Celis to call

if ([[SCListener sharedListener] peakPower] > 0.99) 

in an NSTimer. However, this returns true sometimes when I’m not blowing. Anyone have any sample code to check if the user is blowing into the mic?

  • 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. 2026-05-11T15:12:10+00:00Added an answer on May 11, 2026 at 3:12 pm

    I would recommend low-pass filtering the power signal first. There is always going to be some amount of transient noise that will mess with instantaneous readings; low-pass filtering helps mitigate that. A nice and easy low-pass filter would be something like this:

    // Make this a global variable, or a member of your class: double micPower = 0.0; // Tweak this value to your liking (must be between 0 and 1) const double ALPHA = 0.05;  // Do this every 'tick' of your application (e.g. every 1/30 of a second) double instantaneousPower = [[SCListener sharedListener] peakPower];  // This is the key line in computing the low-pass filtered value micPower = ALPHA * instantaneousPower + (1.0 - ALPHA) * micPower;  if(micPower > THRESHOLD)  // 0.99, in your example     // User is blowing on the microphone 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to detect left click vs right click (without using jQuery!) and I have
I have TreeView Populating from Database And I am Trying to detect the user
I'm trying to detect when a user switches away from the current browser tab,
im trying to detect when a user make a left or right swing in
Trying to detect when a user clicks Cancel but the $_POST on using var_export($_POST)
I'm trying to detect if the user has selected the All Users or the
I am trying to detect which web in sharepoint that the user is looking
I'm trying to determine how I can detect when the user changes the Windows
I'm trying to figure out how to detect when the current user has changed
I'm trying to detect whether a user quickly presses a keyboard key twice, a

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.