Skip Navigation
List Price: $67.85

Rent Book

Select for Price
Add to Cart Free Shipping
There was a problem. Please try again later.

New Book

We're Sorry
Sold Out

Used Book

We're Sorry
Sold Out

Learning Core Audio A Hands-On Guide to Audio Programming for Mac and iOS,9780321636843

Learning Core Audio A Hands-On Guide to Audio Programming for Mac and iOS

by ;
Edition: 1st
Format: Paperback
Pub. Date: 3/30/2012
Publisher(s): Addison-Wesley Professional
Availability: This title is currently not available.


The only guide to Apple's powerful Core Audio framework. Introduces the essential concepts of Mac and iOS audio programming. Task-based coverage explains everything from playing files to digital effects, with detailed sample code. Covers sophisticated techniques, including the creation of 3D sound output for desktop and iOS applications. Co-author Kevin Avila is one of the formeost authorities on Core Audio. Written by two of the world's leading audio programmers, this book is the definitive resource for understanding Apple's Core Audio framework. It fills an enormous gap in the marketplace, providing the practical and accessible learning materials that Core Audio developers have never had. The book begins with a complete introduction to generic digital audio concepts, written to be accessible to the vast majority of developers who've never programmed audio before. It takes high-level look at how Core Audio implements these concepts, presents common 'use cases' for Core Audio, and discusses crucial trade-offs between audio quality, performance, and file size. Next, the authors drill down to each specific task Core Audio developers are likely to perform; tasks such as recording and playing audio, controlling audio files, transcoding between formats, and adding digital effects. They thoroughly explain the relevant API, demonstrating each concept with usable sample code, and offer the insight and context needed to truly adapt that code to fit realworld projects. Building on the basics, the authors introduce several advanced audio development techniques, including programming 3D audio with OpenAL to deliver surround sound output in both Mac and iOS applications. The book also covers Core MIDI, a subset of the Core Audio framework, which can be used to control MIDI devices.

Author Biography

Chris Adamson is an independent writer, editor, and developer who specializes in iOS and Mac development. He is coauthor of iOS SDK Development and author of QuickTime for Java: A Developer's Notebook, Kevin Avila has more than 15 years experience developing for the Mac and, since its release, the iPhone. Kevin has been involved in every corner of the audio market, from being an engineer at Apple to configuring professional recording studios. He currently is a code-mercenary for various clients while sitting in his underwear at home, sipping coffee.

Table of Contents

About the Authorsp. xiii
Forewordp. xv
Introductionp. 1
Audience for This Bookp. 2
What You Need to Knowp. 3
Looking Up Documentationp. 3
How This Book Is Organizedp. 5
About the Sample Codep. 9
Understanding Core Audio
Overview of Core Audiop. 13
The Core Audio Frameworksp. 14
Core Audio Conventionsp. 15
Your First Core Audio Applicationp. 16
Running the Examplep. 19
Core Audio Propertiesp. 22
Summaryp. 23
The Story of Soundp. 25
Making Wavesp. 25
Digital Audiop. 27
DIY Samplesp. 32
Buffersp. 40
Audio Formatsp. 40
Summaryp. 41
Audio Processing with Core Audiop. 43
Audio Data Formatsp. 43
Example: Figuring Out Formatsp. 46
Canonical Formatsp. 51
Processing Audio with Audio Unitsp. 53
The Pull Modelp. 55
Summaryp. 55
Basic Audio
Recordingp. 59
All About Audio Queuesp. 59
Building a Recorderp. 60
A CheckError() Functionp. 63
Creating and Using the Audio Queuep. 64
Utility Functions for the Audio Queuep. 71
The Recording Audio Queue Callbackp. 75
Summaryp. 78
Playbackp. 81
Defining the Playback Applicationp. 81
Setting Up a File-Playing Audio Queuep. 83
Setting Up the Playback Buffersp. 85
Starting the Playback Queuep. 88
Playback Utility Functionsp. 89
Handling the Magic Cookiep. 89
Calculating Buffer Size and Expected Packet Countp. 90
The Playback Audio Queue Callbackp. 91
Features and Limits of Queue-Based Playbackp. 94
Summaryp. 95
Conversionp. 97
The afconvert Utilityp. 97
Using Audio Converter Servicesp. 100
Setting Up Files for Conversionp. 102
Calling Audio Converter Servicesp. 105
Implementing the Converter Callbackp. 109
Converting with Extended Audio File Servicesp. 112
Reading and Converting with Extended Audio Filesp. 116
Summaryp. 118
Advanced Audio
Audio Units: Generators, Effects, and Renderingp. 123
Where the Magic Happensp. 123
How Audio Units Workp. 124
Sizing Up the Audio Unitsp. 126
Your First Audio Unitsp. 129
Building the main() Functionp. 131
Creating an Audio Unit Graphp. 133
Setting Up the File Player Audio Unitp. 137
Speech and Effects with Audio Unitsp. 141
Building Blocks of the Speech Synthesis Graphp. 142
Creating a Speech Synthesis AUGraphp. 144
Setting Up a Speech Synthesizerp. 146
Adding Effectsp. 147
Adding Your Code to the Audio Rendering Processp. 150
The Audio Unit Render Cyclep. 150
A Custom Rendering Examplep. 151
Creating and Connecting Audio Unitsp. 154
The Render Callback Functionp. 155
Summaryp. 160
Audio Units: Input and Mixingp. 161
Working with I/O Inputp. 161
Connecting Input and Output Unitsp. 164
Creating an AUHAL Unit for Inputp. 168
Writing the Input Callbackp. 176
Building an AUGraph to Play Samples from a CARingBufferp. 178
Writing the Play-Through App's Render Callbackp. 181
Running the Play-Through Examplep. 182
Mixingp. 183
Summaryp. 189
Positional Soundp. 191
Sound in Spacep. 191
The OpenAL APIp. 193
Putting a Sound in Spacep. 196
Setting Up the Examplep. 197
Using OpenAL Objectsp. 200
Animating the Source's Positionp. 205
Loading Samples for an OpenAL Bufferp. 206
Streaming Audio in OpenALp. 210
Setting Up the OpenAL Streaming Examplep. 210
Setting Up an ExtAudioFile for Streamingp. 215
Refilling the OpenAL Buffersp. 217
Summaryp. 220
Additional Topics
Core Audio on iOSp. 223
Is That Core Audio in Your Pocket?p. 223
Playing Nicely with Others: Audio Session Servicesp. 224
An Audio Session Examplep. 227
Setting Up the Appp. 227
Initializing the Audio Session and Audio Queuep. 231
The Tone Generator Methodp. 234
Handling iOS Interruptionsp. 236
Audio Units on iOSp. 238
Building an Audio Pass-Through App with the iOS RemoteIO Unitp. 239
Setting Up the Pass-Through Examplep. 241
Setting Up the RemoteIO Audio Unit for Capture and Play-Outp. 244
The RemoteIO Render Callbackp. 249
Other iOS Audio Tricksp. 253
Remote Control on iOSp. 253
iOS Hardware Hazardsp. 254
Summaryp. 254
Core MIDIp. 257
MIDI Conceptsp. 257
Core MIDIp. 258
Core MIDI Architecturep. 258
Core MIDI Terminologyp. 258
Core MIDI Propertiesp. 260
MIDI Messagesp. 260
Instrument Unitsp. 261
Building a Simple MIDI Synthesizerp. 262
Connecting to MIDIp. 265
Handling MIDI Notifications and Eventsp. 267
Playing Your AUGraphp. 269
Creating MIDI Eventsp. 269
Setting Up the MIDIWifiSource Examplep. 269
Setting Up MIDI over Wi-Fip. 271
Sending MIDI Messagesp. 273
Setting Up Your Mac to Receive Wi-Fi MIDI Datap. 275
Summary: MIDI Mastery … but Mobility?p. 277
Codap. 279
Still More Core Audiop. 279
Next Stepsp. 280
Digital Signal Processingp. 280
Lion and iOS 5p. 281
AUSamplerp. 281
Core Audio on iOS 5p. 285
The Core Audio Communityp. 286
Summary: Sounds Goodp. 287
Indexp. 289
Table of Contents provided by Ingram. All Rights Reserved.

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.

American Express