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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:50:27+00:00 2026-06-12T15:50:27+00:00

I’m writing a VOIP app for iPad (currently targeting 2&3). I originally wrote the

  • 0

I’m writing a VOIP app for iPad (currently targeting 2&3).

I originally wrote the audio code using the Audio Unit API, with a kAudioUnitSubtype_RemoteIO unit. This worked well, but unsurprisingly echo was a problem. I tried to use the built-in echo-suppression by switching to using a kAudioUnitSubType_VoiceProcessingIO unit. This works really well on iOS 6 (iPad 3), but the same code on iOS 5.1 (iPad 2) produces white noise on the microphone input.

The documentation just mentions that it should be available in iOS 3.0 and later

The iOS version seems to be the important difference here. I tried running the app on two iPhone 4Ss, one with iOS 6 which sounded fine and one with iOS 5.1 which sounded like white noise.

My ASBD looks like this:

typedef int16_t sample_t;
#define AUDIO_BUFFER_SAMPLE_RATE 48000
#define FORMAT_FLAGS (kAudioFormatFlagsIsSignedInteger | kAudioFormatFlagsIsNonInterleaved)
#define CHANNELS_PER_FRAME 1

...

const size_t bytes_per_sample = sizeof(sample_t);
const int eight_bits_per_byte = 8;
AudioStreamBasicDescription streamFormat;
streamFormat.mFormatID = kAudioFormatLinearPCM;
streamFormat.mSampleRate = AUDIO_BUFFER_SAMPLE_RATE;
streamFormat.mFormatFlags = FORMAT_FLAGS;

streamFormat.mChannelsPerFrame = CHANNELS_PER_FRAME;
streamFormat.mBytesPerFrame = bytes_per_sample * CHANNELS_PER_FRAME;
streamFormat.mBitsPerChannel = bytes_per_sample * eight_bits_per_byte;

streamFormat.mFramesPerPacket = 1;
streamFormat.mBytesPerPacket = streamFormat.mBytesPerFrame * streamFormat.mFramesPerPacket;
streamFormat.mReserved = 0;

Has anyone ever got kAudioUnitSubType_VoiceProcessingIO to work on iOS 5.1?

Does anyone know of any serious documentation for this IO?

  • 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-06-12T15:50:29+00:00Added an answer on June 12, 2026 at 3:50 pm

    TL;DR add kAudioFormatFlagsIsPacked to FORMAT_FLAGS

    I discovered this via a bit of a convoluted route. None of this seems to be well documentated anywhere, but I came across this SO post talking about using the IO on a Mac. One of the things mentioned was using "FlagsCononical". I tried setting:

    #define FORMAT_FLAGS kAudioFormatFlagsAudioUnitCanonical
    

    which didn’t work, and the call to AudioUnitInitialize failed with a return code of 29759. I couldn’t find any documentation about what this meant, but when I tried:

    #define FORMAT_FLAGS kAudioFormatFlagsCanonical
    

    everything worked! Success!

    The definition of kAudioFormatFlagsCanonical in CoreAudioTypes.h if you are building for an iPad (and therefore have CA_PREFER_FIXED_POINT defined as 1) is:

    kAudioFormatFlagsCanonical = kAudioFormatFlagsIsSignedInteger
                               | kAudioFormatFlagsNativeEndian
                               | kAudioFormatFlagIsPacked;
    

    After adding kAudioFormatFlagIsPacked to my original code it worked. I added kAudioFormatFlagsNativeEndian for good measure. I removed kAudioFormatFlagsIsNonInterleaved as it was unnecessary for single channel audio anyway. What I was left with is identical to kAudioFormatFlagsCanonical.

    So my set-up, which worked on an iPad 2 (iOs 5.1) and an iPad 3 (iOS 6.0) was the following:

    • Sample rate of 48000
    • 1 channel
    • kAudioFormatFlagsCanonical
    • int16_t samples
    • Linear PCM

    I’m still keen on documentation for this IO if anyone has any.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm making a simple page using Google Maps API 3. My first. One marker
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Let's say I'm outputting a post title and in our database, it's Hello Y’all

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.