this article reprinted to http://mobile.51cto.com/iphone-423284.htmThe IOS SDK provides a number of convenient ways to play multimedia. This article will use these SDKs to make a demo to tell you how to use them to play audio files.AD:2014WOT Global Software Technology Summit Beijing Station course video releaseThe IOS SDK provides a number of convenient ways to play multimedia. This article will use these SDKs to make a demo to tell you how to use them to play audio files.Audiotoolbox Framework
user's calendar event data
Game Kit
Gk
Provides an API for peer-to-peer network communication
Iad
AD
Embed ads in your app
Map Kit
Mk
Embed maps and geographic information encodings in your application
Message UI
Mf
Provides APIs related to sending e-mail
Twitter
TW
Provides an interface for sending Twitter
UIKit
Ui
Providing UI Classes
communication
AddressBook
Provides the ability to access user contact information
Addressbookui
Provides a user interface for displaying contact information stored in the Address Book
Audiotoolbox
Provides the underlying API for audio recording and playback, as well as managing audio hardware
AudioUnit
Provides an interface that allows our applications to process audio
When using some Parse related services, You need to download the Parse SDK, in addition to adding the corresponding system framework and library support
AudioToolbox. framework
CFNetwork. frameworkCoreGraphics. frameworkCoreLocation. frameworkLibz.1.1.3.dylibMobileCoreServices. frameworkQuartzCore. frameworkSecurity. frameworkStoreKit. frameworkSystemConfiguration. framework
If you have changed the settings when importing Other static libraries, the
1, System Sound Service Introduction:The System Sound service provides an API to play sounds for no more than 30 seconds. It supports file formats that are limited, specifically only CAF, AIF, and WAV files that use PCM or IMA/ADPCM data. However, this function does not provide the ability to manipulate sounds and control the volume, so do not use the system sound service if you are creating specialized sounds for multimedia or games.2, the system sound service supports the following three types
SystemConfiguration
Detects if the current network is available and hardware device status
Avfoundation
provides the bottom of audio recording and playback API , and is also responsible for managing audio hardware
cfnetwork
Access and configure the network, like HTTP FTP and Bonjour Services
corefoundation
Unicode strings " XML URL
Cor
1. Background does not executeLoad the library file first: audiotoolbox.frameworkIntroduction of header file: #import "audiotoolbox/audiotoolbox.h" (Warm tip: because it is called Objective-c Note the file name)Opening method: Audioservicesplaysystemsound (Ksystemsoundid_vibrate);You cannot modify the vibration parameters, each call generates a short 1-2-second vibration. On a platform that does not support vibration, the call does nothing, but it doe
Provides a user interface for displaying contact information stored in the Address Book
Audiotoolbox
Provides the underlying API for audio recording and playback, as well as managing audio hardware
AudioUnit
Provides an interface that allows our applications to process audio
Mapkit
An interface that provides an inline map for an application
MediaPlayer
Provides the abili
we will make an interesting part-playing audio on your iPhone!
There are many ways to play audio on Mac-system sound services, avaudioplayer, audio queue services, and openal. If no external library file is supported, the simplest method is system sound serveices and avaudioplayer. So let's discuss when you can use them, when you can't use them, and how to use them.
System sound services
System sound serverice provides a simple method to play audio files. All you need to do is:
Nss
rate, specifically for Mac OS X and iOS systems.Speech synthesisAvspeechutterance *utt = [avspeechutterance speechutterancewithstring:@ "Test text"]; Utt.rate = [Self.slider value]; [Self.speechsynthesizer Speakutterance:utt];System Sound APIThe System Sound API is subordinate to the C-oriented sub-level API in Core Audio (the book says so, but the code should include Audiotoolbox)Play system SoundPlayback system sound is mainly played using th
1> audio playbackØ dependent frameworks: avfoundation and audiotoolbox ø play long Music: avaudioplayer ø play short sound: load the audio file to generate systemsoundid ø recording: avaudiorecord
2> video playback
Differences between the two video playback classes:
Mpmovieplayercontroller inherits from nsobject;Mpmovieplayerviewcontroller inherits from uiviewcontroller, which encapsulates an mpmovieplayercontroller. Easy to use:
// Load the video r
GPS and WiFi to get location information
Gamekit
Provides network functions for games: point-to-point interconnection and voice communication in games
Addressbook
Provides the ability to access user contacts and information
Addressbookui
Provides a user interface to display the contact information stored in the address book.
Audiotoolbox
Provides underlying APIs for audio recording a
IOS development: Sounds like a system! Make your own voice!This link lists in detail all the system sounds, sound IDs, and sound storage locations in IOS7. Although it is already in the ios8 era, the system sounds are not outdated, after all, there will be no major changes in the dozens of voices. Https://github.com/TUNER88/iOSSystemSoundsLibraryThis stackoverflow contains some useful information and links, including how to play system sound, how to view ref http://stackoverflow.com/questions/78
directly accessing the user contact database. Please refer to the address book framework. AddressBookUI. framework2.0 AB contains the class that displays the system-defined contact selection interface and editing interface. See the iOS Address Book UI framework reference. AssetsLibrary. framework4.0 AL Contains classes for displaying user photos and videos. For details, refer to the resource library framework. AudioToolbox. framework2.0 AU, Audio con
IOS uses ffmpeg to play rstp real-time monitoring video data streamsI. Compile the ffmpeg Library (kxmovie) for the iOS platform. Recently, a project needs to play audio, video, and video stream data monitored in real time by the Network Camera in various formats, finally selected kxmovie, kxmovie project has integrated ffmpeg and simple player, specific can refer to kxmovie home page: https://github.com/kolyvan/kxmovieCompiling kxmovie is simple and supports iOS 6.1.AndArmv7s, once successful,
call the preparation method.
Writing this code seems like it's finished! Compile it! Start the first player you wrote!
Configure Vitamio
You were shocked. The code is well written. Now, after compilation, why is the Code directly failed? 50 errors!
You don't have to worry about this debugging. Do you remember that you haven't configured it after the VitamioSDK is added in?
I still had to configure it. I was so happy just now...First, you need to add some frameworks and dylib to Build Phases, a
IOS online audio playback FreeStreamer
Preface:AboveIn iOS recording practices, we useAVAudioPlayer to play a local audio file. However, in practical applications, we need to play network audio files,In iOS, how does one play network streaming media? The Audio Queue service in the AudioToolbox framework is used. This article will introduce the third-party excellent open-source framework FreeStreamer
1. FreeStreamer features
FreeStreamer is an audio p
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.