Learning Core Audio: A Hands-On Guide t... | WHSmith Books
Learning Core Audio: A Hands-On Guide to Audio Programming for Mac and iOS

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

By: Kevin Avila (author), Chris Adamson (author)Paperback

Up to 2 WeeksUsually despatched within 2 weeks

£31.34 RRP £32.99  You save £1.65 (5%) With FREE Saver Delivery


Audio can affect the human brain in the most powerful and profound ways. Using Apple's Core Audio, you can leverage all that power in your own Mac and iOS software, implementing features ranging from audio capture to real-time effects, MP3 playback to virtual instruments, web radio to VoIP support. The most sophisticated audio programming system ever created, Core Audio is not simple. In Learning Core Audio, top Mac programming author Chris Adamson and legendary Core Audio expert Kevin Avila fully explain this challenging framework, enabling experienced Mac or iOS programmers to make the most of it. In plain language, Adamson and Avila explain what Core Audio can do, how it works, and how it builds on the natural phenomena of sound and the human language of audio. Next, using crystal-clear code examples, they guide you through recording, playback, format conversion, Audio Units, 3D audio MIDI connectivity, and overcoming unique challenges of Core Audio programming for iOS. Coverage includes: mastering Core Audio's surprising style and conventions; recording and playback with Audio Queue; synthesizing audio; perform effects on audio streams; capturing from the mic; mixing multiple streams; managing file streams; converting formats; creating 3D positional audio; using Core MIDI on the Mac; leveraging your Cocoa and Objective-C expertise in Core Audio's C-based environment, and much more. When you've mastered the "black arts" of Core Audio, you can do some serious magic. This book will transform you from an acolyte into a true Core Audio wizard.

About Author

Chris Adamson is an independent writer, editor, and developer who lives in Grand Rapids, Michigan. Now focusing on iOS and Mac development, he is the coauthor of iOS SDK Development. He is also the author of QuickTime for Java: A Developer's Notebook and coauthor of Swing Hacks. He was formerly the editor of java.net and ONJava.com. He consults and publishes through his corporate identity, Subsequently and Furthermore, Inc., with a focus on user-facing and digital media development for Mac and iOS. He blogs on digital media software development at www.subfurther.com/blog. In a previous career, he was a writer/associate producer at CNN Headline News, and over the years, he has managed to own 11 1/2 Macs.Kevin Avila (a.k.a. dogbert) is a smooth blend of carbon compounds, oxygen, hydrogen, and nitrogen, with some impurities for added flavor. Additionally, he 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 he sits in his underwear at home, sipping coffee.


About the Authors xiii Foreword by Mike Lee xvIntroduction 1 Audience for This Book 2 What You Need to Know 3 Looking Up Documentation 3 How This Book Is Organized 5 About the Sample Code 9 PART I: UNDERSTANDING CORE AUDIOChapter 1 Overview of Core Audio 13The Core Audio Frameworks 14Core Audio Conventions 15Your First Core Audio Application 16 Running the Example 19Core Audio Properties 22Summary 23 Chapter 2 The Story of Sound 25Making Waves 25Digital Audio 27DIY Samples 32Buffers 40Audio Formats 40Summary 41 Chapter 3 Audio Processing with Core Audio 43Audio Data Formats 43 Example: Figuring Out Formats 46Canonical Formats 51Processing Audio with Audio Units 53The Pull Model 55Summary 55 PART II: BASIC AUDIOChapter 4 Recording 59All About Audio Queues 59Building a Recorder 60A CheckError() Function 63Creating and Using the Audio Queue 64Utility Functions for the Audio Queue 71 The Recording Audio Queue Callback 75Summary 78 Chapter 5 Playback 81Defining the Playback Application 81Setting Up a File-Playing Audio Queue 83 Setting Up the Playback Buffers 85 Starting the Playback Queue 88Playback Utility Functions 89 Handling the Magic Cookie 89 Calculating Buffer Size and Expected Packet Count 90The Playback Audio Queue Callback 91Features and Limits of Queue-Based Playback 94Summary 95 Chapter 6 Conversion 97The afconvert Utility 97Using Audio Converter Services 100Setting Up Files for Conversion 102 Calling Audio Converter Services 105 Implementing the Converter Callback 109Converting with Extended Audio File Services 112 Reading and Converting with Extended Audio Files 116Summary 118 PART III: ADVANCED AUDIOChapter 7 Audio Units: Generators, Effects, and Rendering 123Where the Magic Happens 123How Audio Units Work 124Sizing Up the Audio Units 126Your First Audio Units 129 Building the main() Function 131 Creating an Audio Unit Graph 133 Setting Up the File Player Audio Unit 137Speech and Effects with Audio Units 141 Building Blocks of the Speech Synthesis Graph 142 Creating a Speech Synthesis AUGraph 144 Setting Up a Speech Synthesizer 146 Adding Effects 147Adding Your Code to the Audio Rendering Process 150 The Audio Unit Render Cycle 150 A Custom Rendering Example 151 Creating and Connecting Audio Units 154 The Render Callback Function 155Summary 160 Chapter 8 Audio Units: Input and Mixing 161Working with I/O Input 161 Connecting Input and Output Units 164 Creating an AUHAL Unit for Input 168 Writing the Input Callback 176 Building an AUGraph to Play Samples from a CARingBuffer 178 Writing the Play-Through App's Render Callback 181 Running the Play-Through Example 182Mixing 183Summary 189 Chapter 9 Positional Sound 191Sound in Space 191The OpenAL API 193Putting a Sound in Space 196 Setting Up the Example 197 Using OpenAL Objects 200 Animating the Source's Position 205 Loading Samples for an OpenAL Buffer 206Streaming Audio in OpenAL 210 Setting Up the OpenAL Streaming Example 210 Setting Up an ExtAudioFile for Streaming 215 Refilling the OpenAL Buffers 217Summary 220 PART IV: ADDITIONAL TOPICSChapter 10 Core Audio on iOS 223Is That Core Audio in Your Pocket? 223Playing Nicely with Others: Audio Session Services 224An Audio Session Example 227 Setting Up the App 227 Initializing the Audio Session and Audio Queue 231 The Tone Generator Method 234 Handling iOS Interruptions 236Audio Units on iOS 238 Building an Audio Pass-Through App with the iOS RemoteIO Unit 239 Setting Up the Pass-Through Example 241 Setting Up the RemoteIO Audio Unit for Capture and Play-Out 244 The RemoteIO Render Callback 249Other iOS Audio Tricks 253 Remote Control on iOS 253 IOS Hardware Hazards 254Summary 254 Chapter 11 Core MIDI 257MIDI Concepts 257Core MIDI 258 Core MIDI Architecture 258 Core MIDI Terminology 258 Core MIDI Properties 260 MIDI Messages 260Instrument Units 261Building a Simple MIDI Synthesizer 262 Connecting to MIDI 265Handling MIDI Notifications and Events 267 Playing Your AUGraph 269Creating MIDI Events 269 Setting Up the MIDIWifiSource Example 269 Setting Up MIDI over Wi-Fi 271 Sending MIDI Messages 273 Setting Up Your Mac to Receive Wi-Fi MIDI Data 275Summary: MIDI Mastery ... but Mobility? 277 Chapter 12 Coda 279Still More Core Audio 279Next Steps 280 Digital Signal Processing 280Lion and iOS 5 281 AUSampler 281 Core Audio on iOS 5 285The Core Audio Community 286Summary: Sounds Good 287 Index 289

Product Details

  • ISBN13: 9780321636843
  • Format: Paperback
  • Number Of Pages: 336
  • ID: 9780321636843
  • weight: 500
  • ISBN10: 0321636848

Delivery Information

  • Saver Delivery: Yes
  • 1st Class Delivery: Yes
  • Courier Delivery: Yes
  • Store Delivery: Yes

Prices are for internet purchases only. Prices and availability in WHSmith Stores may vary significantly