iOS音频视频开发起始点

来源:互联网 发布:福建广电网络书记 编辑:程序博客网 时间:2024/06/07 05:11

Audio & Video Starting Point


Multimedia technologies in iOS let you access the sophisticated audio and video capabilities of iPhone, iPad, and iPod touch. Specialized classes let you easily add basic features such as iPod library playback and movie capture, while rich multimedia APIs support advanced solutions.

iOS上的多媒体技术可以让你让你访问iPhone,iPad和iPod touch上的复杂的音频和视频。专门的类库 让你轻松添加基本特性如iPod图书馆音乐播放、和电影捕获,并且丰富的多媒体api提供了更多的先进的解决方案。



pastedGraphic.png

选择你需要的技术

Choose the right technology for your needs:


  • To play the audio items in a user’s iPod library, or to play local or streamed movies, use the Media Player framework. Classes in this framework automatically support sending audio and video to AirPlay devices such as Apple TV.

播放用户iPod图书馆里的音频,或者播放本地或流电影,使用媒体播放器框架。在这个框架里的类  提供发送 音频和视频 到 AirPlay devices (如苹果电视)的 功能。


  • To easily add picture or movie capture to your app, employ dedicated classes and functions from theUIKit framework.

想要轻松添加图片或影片到你的应用程序,使用UIKit框架中相关的类和函数。


  • For basic audio recording and playback, including stereo panning, synchronization, and metering, use the audio classes from theAV Foundation framework.

基本的音频录制和播放, 包括立体平移、同步、和计量,使用 AV Foundation framework中的 audio classes  。


  • To add high-performance positional audio playback to your OpenGL-based game or other app, take advantage of the open-source OpenAL (Open Audio Library) API.

添加高性能音频播放 到你的OpenGL-based游戏或其他应用程序,利用开源OpenAL(打开音频库)的API。


  • To work directly with audio and video data—for high performance or advanced solutions such as VoIP, streaming, virtual music instruments, or MIDI (Musical Instrument Digital Interface)—use theAV Foundation framework, the Assets Library framework, thevarious Core Audio frameworks (including the Core Audio, Audio Toolbox, and Audio Unit frameworks), and theCore MIDI framework.

工作直接与 音频 和视频数据  相关 ,追求 高性能和先进解决方案如VoIP、流媒体、虚拟乐器,或MIDI(乐器数字接口)   使用 AV的基础框架,资产库框架,各种音频核心框架(包括核心音频,音频工具箱和音频单元框架),和MIDI核心框架。


Get Up and Running

Become Proficient in Audio Development

Become Proficient in Video Development

行动起来

成为精通音频开发者

成为精通视频开发者


Get Up and Running


Familiarize yourself with iOS audio development by checking out these resources:

熟悉iOS音频开发 审查 以下资源:

PS:(注意这里一定要看,看完指南,还要看参考)

  • Read Using Audio in Multimedia Programming Guide to learn about audio development for iOS devices. Make sure to understand the importance of audio session objects as introduced in The Basics:Audio Codecs, Supported Audio Formats, andAudio Sessions in Multimedia Programming Guide.

阅读媒体编程指南中的Using Audio了解iOS设备音频开发。确保理解其中的音频会话对象的重要性, 基于编程指南基础里面介绍的 基本的音频编解码器,支持的音频格式和 音频会话 。

PS:下面这几个是实例

  • View the avTouch sample code project, which shows how to play sounds with theAVAudioPlayer class; the SpeakHere project, which demonstrates basic recording and playback; and theAudio UI Sounds (SysSound) project, which demonstrates how to invoke vibration and play alerts and user-interface sound effects.

avTouch,显示了如何使用AVAudioPlayer类播放声音;SpeakHere,演示了录音 和 回放 ,Audio UI Sounds (SysSound) ,它演示了如何调用振动和警报和用户界面音效。


  • Download and explore theAddMusic sample code project to see a simple demonstration of how to add iPod library playback to your app.

AddMusic项目,你会看到一个简单的示例代码演示了如何将iPod播放库添加到您的应用程序。


  • Read MPVolumeView Class Reference to learn how to quickly add AirPlay capability to your app.

阅读MPVolumeView类,学习如何快速把AirPlay功能添加到您的应用程序。



Get up and running with iOS video development with these resources:

利用以下资源 在 iOS音频开发中行动起来


Become Proficient in Audio Development

成为音频开发专家


Gain a complete understanding of audio session objects, and how they determine your app’s audio behavior, by readingAudio Session Programming Guide. Also be sure to read Sound , which explains how your app should handle sound to meet user expectations.

完全理解 音频会话对象 ,以及它们如何确定应用程序音频的行为,通过阅读音频会话编程指南。一定要读 Sound 这一部分,它说明了你的应用程序应该如何处理声音以满足用户的期望。


No matter which iOS audio technologies you employ, users expect to be able to play and pause your app’s audio using the system transport controls in the multitasking UI. To learn how to support this feature, readRemote Control of Multimedia in Event Handling Guide for iOS.

无论你使用哪些iOS音频技术,用户都希望能够播放和暂停应用程序的音频,使用系统传输控制的多任务的UI。学习这个功能,通过阅读 远程控制的多媒体iOS事件处理指南


Take full advantage of the iPod library by reading iPod Library Access Programming Guide along with Media Player Framework Reference.

充分利用iPod图书馆通过阅读iPod图书馆访问编程指南以及媒体播放器框架参考。


To learn how to play audio using OpenAL, view the oalTouch project

学习如何使用OpenAL播放音频,查看oalTouch项目


PS:这里很重要 

To play streamed audio content, such as from a network connection, use anAVPlayer object as described in Playback inAV Foundation Programming Guide. You can also play certain Internet audio files by using theMPMoviePlayerController class; for sample code that shows how, seeMoviePlayer.

播放音频流,比如通过网络连接,使用一个AVPlayer对象播放,AV Foundation Programming Guide描述了Playback。你也可以播放某些互联网音频文件使用MPMoviePlayerController类;示例代码,见MoviePlayer。


To play audio files with stereo panning, synchronization, and metering, use theAVAudioPlayer class. To record audio, use the AVAudioRecorder class. Apple recommends these classes for audio playback and recording when you do not need direct access to audio data.

立体声播放音频,摇滚、同步和计量,使用AVAudioPlayer类。录音,使用AVAudioRecorder类。苹果建议这些类音频播放和记录时,您不需要直接使用音频数据。


To get started with handling audio data directly, read Core Audio Essentials in Core Audio Overview to learn about the architecture, programming conventions, and use of Core Audio.

处理音频数据,阅读 核心音频概述 里的 核心音频要素,了解体系结构、编程规范和使用核心音频。


If you are creating a VoIP (voice over Internet protocol) app or a virtual music instrument, you need the highest audio performance available in iOS. The solution to use is audio units, the iOS audio plug-in technology. Audio units also provide advanced capabilities including mixing and equalization. Read Audio Unit Hosting Guide for iOS to learn how to use audio units. View theAudio Mixer (MixerHost) and Mixer iPodEQ AUGraph Test sample code projects.

如果你创建一个VoIP(互联网协议语音)应用程序或一个虚拟乐器,你需要ios中最高的音频性能。使用的解决方案是使用 音频单元,iOS音频插件技术。音频单位还提供高级功能包括混合和均衡。阅读Audio Unit Hosting Guide for iOS学习如何使用音频单元。查看音频混合器(MixerHost)和混合器iPodEQ AUGraph测试示例代码项目。


To create a MIDI app for connecting hardware keyboards or synthesizers to an iOS device, refer toCore MIDI Framework Reference and look at the MFi program.

创建一个MIDI应用连接硬件键盘或合成器iOS设备, 参考 核心MIDI框架 中的MFi程序 。


PS: 音频讲了好多,视频就这么一点

Become Proficient in Video Development

成为专业的视频开发者


To progress beyond the capabilities of the Media Player framework and theUIImagePickerController class, read AV Foundation Programming Guide. AV Foundation, with support from the Assets Library and Core Media frameworks, provides tools for advanced video solutions including track-based editing, transcoding, and direct access to data from the camera and microphone.

功能如果超越了 Media Player framework 和 UIImagePickerController类,阅读AV Foundation Programming Guide。AV Foundation 支持资产库和核心媒体框架,提供了工具,先进的视频解决方案包括track-based编辑、代码转换,直接从摄像头和麦克风访问数据。


View the AVCam for iOS sample code project to see how to capture still images and movies using the AV Foundation framework. AVCam demonstrates the use of several important AV Foundation classes. View theAVPlayerDemo project to see how to play movies from the iPod library.

查看AVCam iOS示例代码项目,看看如何捕获静止图像和电影通过使用AV的基础框架。AVCam演示了几个重要的AV基础类的使用。查看AVPlayerDemo项目学习 如何从iPod图书馆播放电影。

0 0
原创粉丝点击