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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:17:58+00:00 2026-05-23T06:17:58+00:00

What is the simplest way to capture audio from the built in audio input

  • 0

What is the simplest way to capture audio from the built in audio input and be able to read the raw sampled values (as in a .wav) in real time as they come in when requested, like reading from a socket.

Hopefully code that uses one of Apple’s frameworks (Audio Queues). Documentation is not very clear, and what I need is very basic.

  • 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-23T06:17:58+00:00Added an answer on May 23, 2026 at 6:17 am

    Try the AudioQueue Framework for this. You mainly have to perform 3 steps:

    1. setup an audio format how to sample the incoming analog audio
    2. start a new recording AudioQueue with AudioQueueNewInput()
    3. Register a callback routine which handles the incoming audio data packages

    In step 3 you have a chance to analyze the incoming audio data with AudioQueueGetProperty()

    It’s roughly like this:

    static void HandleAudioCallback (void                               *aqData,
                                     AudioQueueRef                      inAQ,
                                     AudioQueueBufferRef                inBuffer, 
                                     const AudioTimeStamp               *inStartTime, 
                                     UInt32                             inNumPackets, 
                                     const AudioStreamPacketDescription *inPacketDesc) {
        // Here you examine your audio data
    }
    
    static void StartRecording() {
        // now let's start the recording
        AudioQueueNewInput (&aqData.mDataFormat,  // The sampling format how to record
                            HandleAudioCallback,  // Your callback routine
                            &aqData,              // e.g. AudioStreamBasicDescription
                            NULL,
                            kCFRunLoopCommonModes, 
                            0, 
                            &aqData.mQueue);      // Your fresh created AudioQueue
        AudioQueueStart(aqData.mQueue,
                        NULL);
    }
    

    I suggest the Apple AudioQueue Services Programming Guide for detailled information about how to start and stop the AudioQueue and how to setup correctly all ther required objects.

    You may also have a closer look into Apple’s demo prog SpeakHere. But this is IMHO a bit confusing to start with.

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

Sidebar

Related Questions

What is the simplest way to call a program from with a piece of
What is the simplest way to remove the header row from a flat file
What is the simplest way to remove a trailing slash from each parameter in
What is the simplest way to read and write game configurations like: whether to
What's the simplest way in Ubuntu 11.10 to programmatically guide (either from Bash or
The simplest way to launch a web browser from within a blackberry app is:
What is the simplest way to get the plain-text only from filetypes: Word [2003-2007],
What is the simplest way of removing first four properties from 'properties'. Where properties
Im looking for simplest way to masure how much time a web page loads
The simplest way to deal with python package installations, so far, to me, has

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.