简体   繁体   English

Apple 音频框架之间有什么区别?

[英]What's the difference between the Apple audio frameworks?

In the documentation I see several Apple frameworks for audio.在文档中,我看到了几个 Apple 音频框架。 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?我是否错过了对所有这些进行全面概述的指南?

Core Audio is the lowest-level of all the frameworks and also the oldest. Core Audio 是所有框架中级别最低的,也是最老的。

Audio Toolbox is just above Core Audio and provides many different APIs that make it easier to deal with sound but still gives you a lot of control. Audio Toolbox 就在 Core Audio 之上,提供了许多不同的 API,使处理声音更容易,但仍然给你很多控制权。 There's ExtAudioFile, AudioConverter, and several other useful APIs.有 ExtAudioFile、AudioConverter 和其他几个有用的 API。

Audio Unit is a framework for working with audio processing chains for both sampled audio data and MIDI. Audio Unit 是一个框架,用于处理采样音频数据和 MIDI 的音频处理链。 It's where the mixer and the various filters and effects such as reverb live.这是混音器和各种过滤器和效果器(如混响)的所在。

AV Foundation is a new and fairly high-level API for recording and playing audio on the iPhone OS. AV Foundation 是一个新的、相当高级的 API,用于在 iPhone 操作系统上录制和播放音频。 All of them are available on both OS X and iOS, though AV Foundation requires OS X 10.8+.所有这些都在 OS X 和 iOS 上可用,但 AV Foundation 需要 OS X 10.8+。

I made a brief graphical overview of Core Audio and the its (containing) frameworks:我对 Core Audio 及其(包含)框架进行了简要的图形概述:

iOS 中的音频 API

The framework closest to the hardware is Audio Unit .最接近硬件的框架是Audio Unit Based on that there is OpenAL and AudioToolbox with AudioQueue .基于此,有OpenALAudioToolbox with AudioQueue On top you can find the Media Player and AVFoundation (Audio & Video) frameworks.在顶部,您可以找到媒体播放器AVFoundation (音频和视频)框架。

Now it depends on what you want to do: just a small recording, use AVFoundation , which is the most easiest one to use.现在这取决于你想做什么:只是一小段录音,使用AVFoundation ,这是最容易使用的。 (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.在 iOS 8.0 中,Apple 在 AV Foundation 中引入了AVAudioEngine ,这是一个基于 Objective-C/Swift 的音频图形系统。 This encapsulate some dirty C-stuff from Audio Units.这封装了一些来自 Audio Units 的脏 C-stuff。 Due to the complexity of Audio Unit it is maybe worth a look.由于 Audio Unit 的复杂性,它可能值得一看。

Further readings in the Apple Documentation: Apple 文档中的进一步阅读:

Core Audio is not actually a framework, but an infrastructure that contains many different frameworks. Core Audio 实际上并不是一个框架,而是一个包含许多不同框架的基础设施。 Any audio that comes out of you iOS speaker is, in fact, managed by Core Audio.实际上,iOS 扬声器发出的任何音频都由 Core Audio 管理。

The lowest-level in Core Audio that you can get is by using Audio Units, which you can work with by using the AudioToolbox and the AudioUnit frameworks.您可以获得的 Core Audio 中的最低级别是使用 Audio Units,您可以使用 AudioToolbox 和 AudioUnit 框架来使用它。

The AudioToolbox framework also provides a bit higher level abstractions to deal with playing/recording of audio using AudioQueues, or managing various audio formats by using various Converter and File Services. AudioToolbox 框架还提供了一些更高级别的抽象来处理使用 AudioQueues 播放/录制音频,或使用各种转换器和文件服务管理各种音频格式。

Finally, AV Foundation provides high level access to playing one specific file, and MediaPlayer gives you access (and playback) to your iPod library.最后,AV Foundation 提供播放特定文件的高级访问权限,而 MediaPlayer 允许您访问(和播放)您的 iPod 库。

该站点对不同 API 的核心功能进行了简短而出色的概述: http : //cocoawithlove.com/2011/03/history-of-ios-media-apis-iphone-os-20.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 捆绑名称和Apple App商店名称之间有什么区别? - What's the difference between bundle names and Apple App store names? Apple的iMessage模板或为现有应用添加扩展程序有什么区别? - What is the difference between Apple's iMessage template or adding an extension to an existing app? 这些进口之间有什么区别? - What's the difference between these imports? 使用 CGFloat 和 float 有什么区别? - What's the difference between using CGFloat and float? InstantiateInitialViewController和InstantiateViewControllerWithIdentifier之间有什么区别? - What's the difference between instantiateInitialViewController and instantiateViewControllerWithIdentifier:? iOS中的NSCachesDirectory和NSDownloadsDirectory有什么区别? - what's the difference between NSCachesDirectory and NSDownloadsDirectory in iOS? UIControlStateHighlighted和UIControlStateSelected之间有什么区别? - What's the difference between UIControlStateHighlighted and UIControlStateSelected? NSNumber和NSInteger有什么区别? - What's the difference between NSNumber and NSInteger? position和positionInPixels有什么区别 - What's the difference between position and positionInPixels GLKView和EAGLView有什么区别? - What's the difference between GLKView and EAGLView?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM