Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

iphone - What's the difference between the Apple audio frameworks?

In the documentation I see several Apple frameworks for audio. All of them seem to be targeted at playing and recording audio. So I wonder what the big differences are between these?

  • Audio Toolbox
  • Audio Unit
  • AV Foundation
  • Core Audio

Did I miss a guide that gives a good overview of all these?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I made a brief graphical overview of Core Audio and the its (containing) frameworks:

Audio APIs in iOS

The framework closest to the hardware is Audio Unit. Based on that there is OpenAL and AudioToolbox with AudioQueue. On top you can find the Media Player and AVFoundation (Audio & Video) frameworks.

Now it depends on what you want to do: just a small recording, use AVFoundation, which is the most easiest one to use. (Media Player has no options for recording, it is - as the name says - just a media player.)

Do you want to do serious real time signal processing? Use Audio Unit. But believe me, this is hardest way. :-)

With iOS 8.0 Apple introduced AVAudioEngine, an Objective-C/Swift based audio graph system in AV Foundation. This encapsulate some dirty C-stuff from Audio Units. Due to the complexity of Audio Unit it is maybe worth a look.

Further readings in the Apple Documentation:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...