您好,登錄后才能下訂單哦!
音頻 & 視頻的起始點(diǎn)
iOS中的多媒體技術(shù)使你具備訪問(wèn)iPhone、iPad和iPod touch中的復(fù)雜音頻和視頻的能力。專(zhuān)業(yè)的類(lèi)能讓你輕松的添加諸如 iPod library playback 以及 視頻捕獲等基本的功能,而豐富的多媒體API能夠提供高級(jí)的解決方案。
選擇你所需要的技術(shù):
想要從iPod庫(kù)或本地播放音頻文件,或播放視頻流,要使用 Media Player framework。在這個(gè)框架中得類(lèi)自動(dòng)支持發(fā)送音頻或視頻到AirPlay的設(shè)備,例如Apple TV。
想要輕松的添加圖片或者視頻到你的軟件,需使用UIKit framework中得專(zhuān)用類(lèi)和函數(shù)。
想要使用基本的音頻錄制和回放,包括立體聲、同步和計(jì)量,需使用 AV Foundation framework 中的一些音頻類(lèi)。
想要添加高性能位置音頻回放你的OpenGL-based游戲或其他應(yīng)用程序,需使用開(kāi)源OpenAL(打開(kāi)音頻庫(kù))的API。
想要使用諸如VoIP、流媒體、虛擬樂(lè)器、或MIDI(Musical Instrument Digital Interface,樂(lè)器數(shù)字接口)等高性能音頻視頻數(shù)據(jù)或先進(jìn)方案,需使用AV Foundation framework、 the Assets(資產(chǎn)) Library framework、 各種音頻核心框架(包括 Core Audio、Audio Toolbox、 和 AudioFrameworksEworks)、 和 Core MIDI framework。
內(nèi)容:
Get Up and Running
Become Proficient in Audio Development
Become Proficient in Video Development
Get Up and Running
起點(diǎn)與運(yùn)行
通過(guò)下面的這些資源,熟悉iOS的音頻開(kāi)發(fā):
讀 Multimedia Programming Guide 中的 “Using Audio”,學(xué)習(xí)關(guān)于iOS設(shè)備的音頻開(kāi)發(fā)。一定要理解 Multimedia Programming Guide 中的 “The Basics: Audio Codecs, Supported Audio Formats, and Audio Sessions” 中介紹的關(guān)于音頻會(huì)話對(duì)象的重要性。
View the avTouch sample code project, which shows how to play sounds with the AVAudioPlayer class; the SpeakHere project, which demonstrates basic recording and playback; and the Audio UI Sounds (SysSound) project, which demonstrates how to invoke vibration and play alerts and user-interface sound effects.
查看avTouch示例代碼項(xiàng)目,它展示了如何用AVAudioPlayer類(lèi)播放聲音;在SpeakHere 工程,它示范了基本的錄音和回放;在Audio UI Sounds (SysSound) 工程,它示范了如何調(diào)用震動(dòng)和播放警報(bào)以及用戶(hù)界面音效。
Download and explore the AddMusic sample code project to see a simple demonstration of how to add iPod library playback to your app.
下載并探索AddMusic 示例代碼工程,來(lái)看一個(gè)簡(jiǎn)單的演示如何添加iPod庫(kù)的播放到你的app。
Read MPVolumeView Class Reference to learn how to quickly add AirPlay capability to your app.
閱讀MPVolumeView Class Reference來(lái)學(xué)習(xí)如何快速的添加AirPlay 功能到你的app。
Get up and running with iOS video development with these resources:
通過(guò)下面資源,熟悉iOS 視頻開(kāi)發(fā):
Read “Using Video” in Multimedia Programming Guide for an overview of video recording and playback on iOS devices.
閱讀Multimedia Programming Guide 中的“Using Video” 來(lái)看在iOS設(shè)備上進(jìn)行視頻錄制和回放的概述。
View the MoviePlayer sample code project, which demonstrates the powerful MPMoviePlayerController class for playing local or streamed video content; and the Using UIImagePickerController to Select Pictures and Take Photos project, which demonstrates simple movie and picture capture using the UIKit framework.
查看MoviePlayer 示例代碼工程,它示范了強(qiáng)大的MPMoviePlayerController 類(lèi)來(lái)播放本地的以及流視頻內(nèi)容;以及Using UIImagePickerController to Select Pictures and Take Photos 工程,它示范了使用UIKit 框架進(jìn)行簡(jiǎn)單的視頻和圖像捕捉。
Continue by reading Camera Programming Topics for iOS to learn how take pictures and movies, and to browse the photo library, using the UIImagePickerController class.
閱讀 Camera Programming Topics for iOS來(lái)繼續(xù)學(xué)習(xí)如何制作照片和視頻,并使用UIImagePickerController 類(lèi)來(lái)瀏覽照片庫(kù)。
Become Proficient in Audio Development
精通音頻開(kāi)發(fā)
Gain a complete understanding of audio session objects, and how they determine your app’s audio behavior, by reading Audio Session Programming Guide. Also be sure to read “Sound” in iOS Human Interface Guidelines, which explains how your app should handle sound to meet user expectations.
通過(guò)閱讀Audio Session Programming Guide獲得一個(gè)對(duì)音頻隊(duì)列對(duì)象的完整理解,并且理解他們?nèi)绾未_定app的音頻行為。也要讀iOS Human Interface Guidelines中的“Sound”,它解釋了app應(yīng)該如何處理聲音來(lái)滿(mǎn)足用戶(hù)的期望。
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, read “Remote Control of Multimedia” in Event Handling Guide for iOS.
無(wú)論你使用哪個(gè)iOS 音頻技術(shù),用戶(hù)希望使用系統(tǒng)傳輸控制的多任務(wù)UI來(lái)播放以及暫停app的音頻。想要學(xué)習(xí)這個(gè)功能的支持,閱讀Event Handling Guide for iOS中的“Remote Control of Multimedia”。
Take full advantage of the iPod library by reading iPod Library Access Programming Guide along with Media Player Framework Reference.
通過(guò)閱讀 iPod Library Access Programming Guide 以及 Media Player Framework Reference.來(lái)充分理解iPod庫(kù)
To learn how to play audio using OpenAL, view the oalTouch project. The website openal.org hosts documentation for the open-source OpenAL API.
想要學(xué)習(xí)如何使用OpenAL來(lái)播放音頻,參看oalTouch 工程。網(wǎng)站openal.org有開(kāi)源的OpenAL API。
To play streamed audio content, such as from a network connection, use an AVPlayer object as described in “Playback” in AV Foundation Programming Guide. You can also play certain Internet audio files by using the MPMoviePlayerController class; for sample code that shows how, see MoviePlayer.
想要播放音頻流內(nèi)容,例如從網(wǎng)絡(luò)連接得到的,使用一個(gè)如AV Foundation Programming Guide中的“Playback”所描述的AVPlayer 對(duì)象。你也可以通過(guò)使用MPMoviePlayerController 類(lèi)來(lái)播放某些互聯(lián)網(wǎng)音頻文件;示例代碼可以參看MoviePlayer。
To play audio files with stereo panning, synchronization, and metering, use the AVAudioPlayer 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.
想要在播放音頻文件的時(shí)候有stereo panning,synchronization以及metering,使用AVAudioPlayer 類(lèi)。想要錄制音頻,使用AVAudioRecorder 類(lèi)。當(dāng)你不需要直接訪問(wèn)音頻數(shù)據(jù)的時(shí)候,Apple 建議使用這些為音頻回放和錄制的類(lèi)。
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.
想要開(kāi)始直接處理音頻數(shù)據(jù),閱讀Core Audio Overview中的Core Audio Essentials來(lái)學(xué)習(xí)關(guān)于體系架構(gòu)、編程約定以及使用Core Audio的內(nèi)容。
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 the Audio Mixer (MixerHost) and iPhoneMixerEQGraphTest sample code projects.
如果你創(chuàng)建了一個(gè)VoIP(互聯(lián)網(wǎng)語(yǔ)音傳輸協(xié)議)app或者虛擬樂(lè)器,你需要在iOS中最高的可能的音頻效果。解決的方案是使用音頻單元,iOS音頻插件基礎(chǔ)。音頻單元還提供高級(jí)的功能包括混音和均衡。閱讀Audio Unit Hosting Guide for iOS 來(lái)學(xué)習(xí)如何使用音頻單元。查看Audio Mixer (MixerHost) 和iPhoneMixerEQGraphTest的示例代碼工程。
To create a MIDI app for connecting hardware keyboards or synthesizers to an iOS device, refer to Core MIDI Framework Reference and look at the MFi program.
想要?jiǎng)?chuàng)建一個(gè)MIDI app來(lái)連接硬件鍵盤(pán)或合成器到iOS設(shè)備,參考Core MIDI Framework Reference 以及看看MFi program。
Become Proficient in Video Development
精通視頻開(kāi)發(fā)
To progress beyond the capabilities of the Media Player framework and the UIImagePickerController 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 框架的功能以及UIImagePickerController 類(lèi),閱讀AV Foundation Programming Guide。AV Foundation,支持Assets Library 和Core Media框架,為提高視頻解決包括track-based 編輯、代碼轉(zhuǎn)換、以及直接訪問(wèn)來(lái)自相機(jī)或麥克風(fēng)的數(shù)據(jù)提供工具。
View the AVCam for iOS sample code project to see how to capture still p_w_picpaths and movies using the AV Foundation framework. AVCam demonstrates the use of several important AV Foundation classes. View the AVPlayerDemo project to see how to play movies from the iPod library.
參閱AVCam for iOS 示例代碼工程來(lái)看看如何使用AV Foundation 框架得到靜止的畫(huà)面以及視頻。AVCam演示使用了幾種重要的AV Foundation 類(lèi)。參閱AVPlayerDemo 工程來(lái)看如何播放來(lái)自iPod庫(kù)的視頻。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。