user1884325
user1884325

Reputation: 2550

Audio driver for iOS and OSX based on Core Audio

Is it possible to have a common implementation of a Core Audio based audio driver bridge for iOS and OSX ? Or is there a difference in the Core Audio API for iOS versus the Core Audio API for OSX?

The audio bridge only needs to support the following methods:

  1. Set desired sample rate
  2. Set desired audio block size (in samples)
  3. Start/Stop microphone stream
  4. Start/Stop speaker stream

The application supplies 2 callback function pointers to the audio bridge and the audio bridge sets everything up so that:

  1. The speaker callback is called on regular time intervals where it's requested to return an audio block
  2. The microphone callback is called on regular time intervals where it receives an audio block

I was told that it's not possible to have a single implementation which works on both iOS and OSX as there are differences between the iOS Core Audio API and the OSX Core Audio API.

Is this true?

Upvotes: 0

Views: 675

Answers (1)

hotpaw2
hotpaw2

Reputation: 70703

There are no significant differences between the Core Audio API on OS X and on iOS. However there are significant differences in obtaining the correct Audio Unit for the microphone and the speaker to use. There are only 2 units on iOS (RemoteIO and one for VOIP), but more and potentially many more on a Mac, plus the user might change the selection. There are also differences in some of the Audio Unit parameters (buffer size, sample rates, etc.) allowed/supported by the hardware.

Upvotes: 0

Related Questions