SlideShare uma empresa Scribd logo
1 de 97
Baixar para ler offline
Core Audio in iOS 6
Chris Adamson • @invalidname
CocoaConf San Jose
April 20, 2013
Sides and code available on my blog:
http://www.subfurther.com/blog
Monday, April 29, 13
Plug!
Monday, April 29, 13
The Reviews Are In!
Monday, April 29, 13
The Reviews Are In!
Monday, April 29, 13
The Reviews Are In!
Monday, April 29, 13
The Reviews Are In!
Monday, April 29, 13
Legitimate copies!
• Amazon (paper or Kindle)
• Barnes & Noble (paper or Nook)
• Apple (iBooks)
• Direct from InformIT (paper, eBook [.epub
+ .mobi + .pdf], or Bundle)
Monday, April 29, 13
WhatYou’ll Learn
• What Core Audio does and doesn’t do
• When to use and not use it
• What’s new in Core Audio for iOS 6
Monday, April 29, 13
Monday, April 29, 13
Simple things should be simple,
complex things should be possible.
–Alan Kay
Monday, April 29, 13
Simple things should be simple,
complex things should be possible.
–Alan Kay
AV Foundation,
Media Player
Monday, April 29, 13
Simple things should be simple,
complex things should be possible.
–Alan Kay
AV Foundation,
Media Player
Core Audio
Monday, April 29, 13
Core Audio
• Low-level C framework for processing
audio
• Capture, play-out, real-time or off-line
processing
• The “complex things should be possible”
part of audio on OS X and iOS
Monday, April 29, 13
Chris’ CA Taxonomy
• Engines: process streams of audio
• Capture, play-out, mixing, effects
processing
• Helpers: deal with formats, encodings, etc.
• File I/O, stream I/O, format conversion,
iOS “session” management
Monday, April 29, 13
Helpers:Audio File
• Read from / write to multiple audio file
types (.aiff, .wav, .caf, .m4a, .mp3) in a
content-agnostic way
• Get metadata (data format, duration,
iTunes/ID3 info)
Monday, April 29, 13
Helpers:Audio File
Stream
• Read audio from non-random-access
source like a network stream
• Discover encoding and encapsulation on
the fly, then deliver audio packets to client
application
Monday, April 29, 13
Helpers: Converters
• Convert buffers of audio to and from
different encodings
• One side must be in an uncompressed
format (i.e., Linear PCM)
Monday, April 29, 13
Helpers: ExtAudioFile
• Combine file I/O and format conversion
• Read a compressed file into PCM buffers
• Write PCM buffers into a compressed file
Monday, April 29, 13
Helpers:Audio Session
• iOS-only API to negotiate use of audio
resources with the rest of the system
• Deetermine whether your app mixes with
other apps’ audio, honors ring/silent
switch, can play in background, etc.
• Gets notified of audio interruptions
• See also AVAudioSession
Monday, April 29, 13
Engines:Audio Units
• Low-latency (~10ms) processing of
capture/play-out audio data
• Effects, mixing, etc.
• Connect units manually or via an AUGraph
• Much more on this topic momentarily…
Monday, April 29, 13
Engines:Audio Queue
• Convenience API for recording or play-out,
built atop audio units
• Rather than processing on-demand and on
Core Audio’s thread, your callback provides
or receives buffers of audio (at whatever
size is convenient to you)
• Higher latency, naturally
• Supports compressed formats (MP3,AAC)
Monday, April 29, 13
Engines: Open AL
• API for 3D spatialized audio, implemented
atop audio units
• Set a source’s properties (x/y/z
coordinates, orientation, audio buffer, etc.),
OpenAL renders what it sounds like to the
listener from that location
Monday, April 29, 13
Engines and Helpers
• Audio Units
• Audio Queue
• Open AL
• Audio File
• Audio File Stream
• Audio Converter
• ExtAudioFile
• Audio Session
Monday, April 29, 13
Audio Units
Monday, April 29, 13
Audio Unit
AUSomething
Monday, April 29, 13
Types of Audio Units
• Output (which also do input)
• Generator
• Converter
• Effect
• Mixer
• Music
Monday, April 29, 13
Pull Model
AUSomething
Monday, April 29, 13
Pull Model
AUSomething
AudioUnitRender()
Monday, April 29, 13
Pull Model
AUSomethingAUSomethingElse
Monday, April 29, 13
Buses (aka, Elements)
AUSomething
AUSomethingElse
AUSomethingElse
Monday, April 29, 13
AUGraph
AUSomething
AUSomethingElse
AUSomethingElse
Monday, April 29, 13
Render Callbacks
AUSomething
AUSomethingElse
OSStatus converterInputRenderCallback (void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList * ioData) {
CCFWebRadioPlayer *player = (__bridge CCFWebRadioPlayer*) inRefCon;
// read from buffer
ioData->mBuffers[0].mData = player.preRenderData;
return noErr;
}
Monday, April 29, 13
AURemoteIO
• Output unit used for play-out, capture
• A Core Audio thread repeatedly and
automatically calls AudioUnitRender()
• Must set EnableIO property to explicitly
enable capture and/or play-out
• Capture requires setting appropriate
AudioSession category
Monday, April 29, 13
Create AURemoteIO
CheckError(NewAUGraph(&_auGraph),
! ! "couldn't create au graph");
!
CheckError(AUGraphOpen(_auGraph),
! ! "couldn't open au graph");
!
AudioComponentDescription componentDesc;
componentDesc.componentType = kAudioUnitType_Output;
componentDesc.componentSubType = kAudioUnitSubType_RemoteIO;
componentDesc.componentManufacturer =
kAudioUnitManufacturer_Apple;
!
AUNode remoteIONode;
CheckError(AUGraphAddNode(_auGraph,
! ! ! ! ! ! &componentDesc,
! ! ! ! ! ! &remoteIONode),
! ! "couldn't add remote io node");
Monday, April 29, 13
Getting an AudioUnit
from AUNode
! CheckError(AUGraphNodeInfo(self.auGraph,
! ! ! ! ! ! ! remoteIONode,
! ! ! ! ! ! ! NULL,
! ! ! ! ! ! ! &_remoteIOUnit),
! ! ! "couldn't get remote io unit from node");
Monday, April 29, 13
AURemoteIO Buses
AURemoteIO
Monday, April 29, 13
AURemoteIO Buses
AURemoteIO
bus 0
to output H/W
Monday, April 29, 13
AURemoteIO Buses
AURemoteIO
bus 0
to output H/W
bus 0
from app
Monday, April 29, 13
AURemoteIO Buses
AURemoteIO
bus 0
to output H/W
bus 1
from input H/W
bus 0
from app
Monday, April 29, 13
AURemoteIO Buses
AURemoteIO
bus 0
to output H/W
bus 1
from input H/W
bus 1
to app
bus 0
from app
Monday, April 29, 13
EnableIO
! UInt32 oneFlag = 1;
! UInt32 busZero = 0;
! CheckError(AudioUnitSetProperty(self.remoteIOUnit,
! ! ! ! ! ! ! ! ! kAudioOutputUnitProperty_EnableIO,
! ! ! ! ! ! ! ! ! kAudioUnitScope_Output,
! ! ! ! ! ! ! ! ! busZero,
! ! ! ! ! ! ! ! ! &oneFlag,
! ! ! ! ! ! ! ! ! sizeof(oneFlag)),
! ! ! "couldn't enable remote io output");
! UInt32 busOne = 1;
! CheckError(AudioUnitSetProperty(self.remoteIOUnit,
! ! ! ! ! ! ! ! ! kAudioOutputUnitProperty_EnableIO,
! ! ! ! ! ! ! ! ! kAudioUnitScope_Input,
! ! ! ! ! ! ! ! ! busOne,
! ! ! ! ! ! ! ! ! &oneFlag,
! ! ! ! ! ! ! ! ! sizeof(oneFlag)),
! ! ! "couldn't enable remote io input");
Monday, April 29, 13
Pass Through
AURemoteIO
bus 1
from input H/W
bus 0
to output H/W
Monday, April 29, 13
Connect In to Out
! UInt32 busZero = 0;
! UInt32 busOne = 1;
! CheckError(AUGraphConnectNodeInput(self.auGraph,
! ! ! ! ! ! ! ! ! remoteIONode,
! ! ! ! ! ! ! ! ! busOne,
! ! ! ! ! ! ! ! ! remoteIONode,
! ! ! ! ! ! ! ! ! busZero),
! ! ! "couldn't connect remote io bus 1 to 0");
Monday, April 29, 13
Pass-Through with Effect
bus 0
to output H/W
AURemoteIO
AUEffect
bus 1
from input H/W
Monday, April 29, 13
Demo: Delay Effect
New in iOS 6!
Monday, April 29, 13
Creating the AUDelay
! componentDesc.componentType = kAudioUnitType_Effect;
! componentDesc.componentSubType = kAudioUnitSubType_Delay;
! componentDesc.componentManufacturer =
kAudioUnitManufacturer_Apple;
!
! AUNode effectNode;
! CheckError(AUGraphAddNode(self.auGraph,
! ! ! ! ! ! ! &componentDesc,
! ! ! ! ! ! ! &effectNode),
! ! ! "couldn't create effect node");
! AudioUnit effectUnit;
! CheckError(AUGraphNodeInfo(self.auGraph,
! ! ! ! ! ! ! effectNode,
! ! ! ! ! ! ! NULL,
! ! ! ! ! ! ! &effectUnit),
! ! ! "couldn't get effect unit from node");
Monday, April 29, 13
The problem with effect
units
• Audio Units available since iPhone OS 2.0
prefer int formats
• Effect units arrived with iOS 5 (arm7 era)
and only work with float format
• Have to set the AUEffect unit’s format on
AURemoteIO
Monday, April 29, 13
Setting formats
! AudioStreamBasicDescription effectDataFormat;
! UInt32 propSize = sizeof (effectDataFormat);
! CheckError(AudioUnitGetProperty(effectUnit,
! ! ! ! ! ! ! ! ! kAudioUnitProperty_StreamFormat,
! ! ! ! ! ! ! ! ! kAudioUnitScope_Output,
! ! ! ! ! ! ! ! ! busZero,
! ! ! ! ! ! ! ! ! &effectDataFormat,
! ! ! ! ! ! ! ! ! &propSize),
! ! ! "couldn't read effect format");
! CheckError(AudioUnitSetProperty(self.remoteIOUnit,
! ! ! ! ! ! ! ! ! kAudioUnitProperty_StreamFormat,
! ! ! ! ! ! ! ! ! kAudioUnitScope_Output,
! ! ! ! ! ! ! ! ! busOne,
! ! ! ! ! ! ! ! ! &effectDataFormat,
! ! ! ! ! ! ! ! ! propSize),
! ! ! "couldn't set bus one output format");
Then repeat AudioUnitSetProperty() for input scope / bus 0
Monday, April 29, 13
AUNewTimePitch
• New in iOS 6!
• Allows you to change pitch independent of
time, or time independent of pitch
• How do you use it?
Monday, April 29, 13
AUTimePitch
! AudioComponentDescription effectcd = {0};
! effectcd.componentType = kAudioUnitType_FormatConverter;
! effectcd.componentSubType = kAudioUnitSubType_NewTimePitch;
! effectcd.componentManufacturer = kAudioUnitManufacturer_Apple;
!
! AUNode effectNode;
! CheckError(AUGraphAddNode(self.auGraph,
! ! ! ! ! ! ! &effectcd,
! ! ! ! ! ! ! &effectNode),
! ! ! "couldn't get effect node [time/pitch]");
Notice the type is AUFormatConverter, not AUEffect
Monday, April 29, 13
AudioUnitParameters.h
// Parameters for AUNewTimePitch
enum {
! ! // Global, rate, 1/32 -> 32.0, 1.0
! kNewTimePitchParam_Rate!! ! ! ! ! ! = 0,
! ! // Global, Cents, -2400 -> 2400, 1.0
! kNewTimePitchParam_Pitch! ! ! ! ! ! = 1,
! ! // Global, generic, 3.0 -> 32.0, 8.0
! kNewTimePitchParam_Overlap! ! ! ! ! ! = 4,
! ! // Global, Boolean, 0->1, 1
! kNewTimePitchParam_EnablePeakLocking! ! ! = 6
};
This is the entire documentation for the AUNewTimePitch parameters
Monday, April 29, 13
AUNewTimePitch
parameters
• Rate: kNewTimePitchParam_Rate takes a
Float32 rate from 1/32 speed to 32x
speed.
• Use powers of 2: 1/32, 1/16, …, 2, 4, 8…
• Pitch: kNewTimePitchParam_Pitch takes
a Float32 representing cents, meaning
1/100 of a musical semitone
Monday, April 29, 13
Pitch shifting
• Pitch can vary, time does not
• Suitable for real-time sources, such as
audio capture
Monday, April 29, 13
Demo: Pitch Shift
New in iOS 6!
Monday, April 29, 13
Rate shifting
• Rate can vary, pitch does not
• Think of 1.5x and 2x speed modes in
Podcasts app
• Not suitable for real-time sources, as data
will be consumed faster. Files work well.
• Sources must be able to map time
systems with
kAudioUnitProperty_InputSamplesInOutput
Monday, April 29, 13
Demo: Rate Shift
New in iOS 6!
Monday, April 29, 13
AUSplitter
AUSplitter
AUSomethingElse
AUSomethingElse
New in iOS 6!
Monday, April 29, 13
AUMatrixMixer
AUMatrixMixer
AUSomethingElse
AUSomethingElse
AUSomethingElse
AUSomethingElse
AUSomethingElse
New in iOS 6!
Monday, April 29, 13
Audio Queues
(and the APIs that help them)
Monday, April 29, 13
AudioQueue
• Easier than AURemoteIO - provide data
when you want to, less time pressure, can
accept or provide compressed formats
(MP3,AAC)
• Recording queue - receive buffers of
captured audio in a callback
• Play-out queue - enqueue buffers of audio
to play, optionally refill in a callback
Monday, April 29, 13
Audio Queue
Monday, April 29, 13
Audio Queue
Monday, April 29, 13
Audio Queue
Monday, April 29, 13
Audio Queue
Monday, April 29, 13
Common AQ scenarios
• File player - Read from file and “prime”
queue buffers, start queue, when called
back with used buffer, refill from next part
of file
• Synthesis - Maintain state in your own
code, write raw samples into buffers during
callbacks
Monday, April 29, 13
Web Radio
• Project from Thursday’s workshop
• Use Audio File Stream Services to pick out
audio data from a network stream
• Enqueue these packets as new AQ buffers
• Dispose used buffers in callback
Monday, April 29, 13
Parsing web radio
Monday, April 29, 13
Parsing web radio
NSData NSData
Packets Packets Packets Packets Packets
NSURLConnection delivers
NSData buffers, containing audio
and framing info.We pass it to
Audio File Services.
Monday, April 29, 13
Parsing web radio
NSData NSData
Packets Packets Packets Packets Packets
Packets Packets
Packets Packets Packets
NSURLConnection delivers
NSData buffers, containing audio
and framing info.We pass it to
Audio File Services.
Audio File Services calls us back
with parsed packets of audio data.
Monday, April 29, 13
Parsing web radio
NSData NSData
Packets Packets Packets Packets Packets
Packets Packets
Packets Packets Packets
012
Packets
Packets
Packets
Packets
Packets
Packets
NSURLConnection delivers
NSData buffers, containing audio
and framing info.We pass it to
Audio File Services.
Audio File Services calls us back
with parsed packets of audio data.
We create an AudioQueueBuffer
with those packets and enqueue it
for play-out.
Monday, April 29, 13
A complex thing!
• What if we want to see that data after it’s
been decoded to PCM and is about to be
played?
• e.g., spectrum analysis, effects, visualizers
• AudioQueue design is “fire-and-forget”
Monday, April 29, 13
AudioQueue Tap!
http://www.last.fm/music/Spinal+Tap
Monday, April 29, 13
AudioQueueProcessingTap
• Set as a property on the Audio Queue
• Calls back to your function with decoded
(PCM) audio data
• Three types: pre- or post- effects (that the
AQ performs), or siphon. First two can
modify the data.
• Only documentation is in AudioQueue.h
Monday, April 29, 13
Creating an AQ Tap
! ! // create the tap
! ! UInt32 maxFrames = 0;
! ! AudioStreamBasicDescription tapFormat = {0};
! ! AudioQueueProcessingTapRef tapRef;
! ! CheckError(AudioQueueProcessingTapNew(audioQueue,
! ! ! ! ! ! ! ! ! ! ! tapProc,
! ! ! ! ! ! ! ! ! ! ! (__bridge void *)(player),
! ! ! ! ! ! ! ! ! ! ! kAudioQueueProcessingTap_PreEffects,
! ! ! ! ! ! ! ! ! ! ! &maxFrames,
! ! ! ! ! ! ! ! ! ! ! &tapFormat,
! ! ! ! ! ! ! ! ! ! ! &tapRef),
! ! ! ! "couldn't create AQ tap");
Notice that you receive maxFrames and tapFormat.These do not appear to be settable.
Monday, April 29, 13
AQ Tap Proc
void tapProc (void * inClientData,
! ! ! AudioQueueProcessingTapRef inAQTap,
! ! ! UInt32 inNumberFrames,
! ! ! AudioTimeStamp * ioTimeStamp,
! ! ! UInt32 * ioFlags,
! ! ! UInt32 * outNumberFrames,
! ! ! AudioBufferList * ioData) {
! CCFWebRadioPlayer *player =
(__bridge CCFWebRadioPlayer*) inClientData;
! UInt32 getSourceFlags = 0;
! UInt32 getSourceFrames = 0;
! AudioQueueProcessingTapGetSourceAudio(inAQTap,
! ! ! ! ! ! ! ! ! ! inNumberFrames,
! ! ! ! ! ! ! ! ! ! ioTimeStamp,
! ! ! ! ! ! ! ! ! ! &getSourceFlags,
! ! ! ! ! ! ! ! ! ! &getSourceFrames,
! ! ! ! ! ! ! ! ! ! ioData);
// then do something with ioData
// ...
Monday, April 29, 13
So what should we do
with the audio?
Monday, April 29, 13
So what should we do
with the audio?
Let’s apply our pitch-shift effect
Monday, April 29, 13
Shouldn’t this work?
AUEffect
Monday, April 29, 13
Shouldn’t this work?
AUEffect
AudioUnitRender()
Monday, April 29, 13
AudioUnitRender()
• Last argument is an AudioBufferList, whose
AudioBuffer members have mData pointers
• If mData != NULL, audio unit does its
thing with those samples
• If mData == NULL, audio data pulls from
whatever it’s connected to
• So we just call with AudioBufferList ioData
we got from tap callback, right?
Monday, April 29, 13
Psych!
• AQ tap provides data as signed ints
• Effect units only work with floating point
• We need to do an on-the-spot format
conversion
Monday, April 29, 13
invalidname’s convert-
and-effect recipe
AUGenericOutputAUConverterAUEffectAUConverter
OSStatus converterInputRenderCallback (void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList * ioData) {
CCFWebRadioPlayer *player = (__bridge CCFWebRadioPlayer*) inRefCon;
// read from buffer
ioData->mBuffers[0].mData = player.preRenderData;
return noErr;
}
Note: red arrows are float format, yellow arrows are int
Monday, April 29, 13
How it works
• AUGraph:AUConverter → AUEffect →
AUConverter → AUGenericOutput
• Top AUConverter is connected to a render
callback function
Monday, April 29, 13
The trick!
• Copy mData pointer to a state variable and
NULL it in ioData
• Call AudioQueueRender() on output unit.
The NULL makes it pull from the graph.
• Top of the graph pulls on render callback,
which gives it back the mData we copied
off.
Monday, April 29, 13
Yes, really
This is the rest of tapProc()
! // copy off the ioData so the graph can read from it
// in render callback
! player.preRenderData = ioData->mBuffers[0].mData;
! ioData->mBuffers[0].mData = NULL;
!
! OSStatus renderErr = noErr;
! AudioUnitRenderActionFlags actionFlags = 0;
! renderErr = AudioUnitRender(player.genericOutputUnit,
! ! ! ! ! ! ! ! &actionFlags,
! ! ! ! ! ! ! ! player.renderTimeStamp,
! ! ! ! ! ! ! ! 0,
! ! ! ! ! ! ! ! inNumberFrames,
! ! ! ! ! ! ! ! ioData);
! NSLog (@"AudioUnitRender, renderErr = %ld",renderErr);
}
Monday, April 29, 13
Yes, really
OSStatus converterInputRenderCallback (void *inRefCon,
! ! ! ! ! ! ! ! ! AudioUnitRenderActionFlags *ioActionFlags,
! ! ! ! ! ! ! ! ! const AudioTimeStamp *inTimeStamp,
! ! ! ! ! ! ! ! ! UInt32 inBusNumber,
! ! ! ! ! ! ! ! ! UInt32 inNumberFrames,
! ! ! ! ! ! ! ! ! AudioBufferList * ioData) {
! CCFWebRadioPlayer *player =
(__bridge CCFWebRadioPlayer*) inRefCon;
!
! // read from buffer
! ioData->mBuffers[0].mData = player.preRenderData;
! return noErr;
}
This is the render callback that supplies data to the int→float converter
Monday, April 29, 13
Demo:AQ Tap +
AUNewTimePitch
New in iOS 6!
Monday, April 29, 13
Monday, April 29, 13
Meanwhile in a mini-
bus near
Copenhagan…
Monday, April 29, 13
Audiobus
Monday, April 29, 13
Audiobus
• Allows multiple audio apps to exchange
data in realtime
• Works by sending raw data in MIDI
• Actually approved by Apple
• Actually supported in GarageBand
Monday, April 29, 13
Monday, April 29, 13
Monday, April 29, 13
Supporting Audiobus
• Get the SDK from audiob.us
• Enable background mode, add an audiobus-
compatible URL scheme, get API key from
audiob.us
• Create and use ABAudiobusController,
ABOutputPort/ABInputPort, and
ABAudiobusAudioUnitWrapper
Monday, April 29, 13
Wrapping up…
Monday, April 29, 13
Takeaways
• Core Audio fundamentals never change
• New stuff is added as properties, typedefs,
enums, etc.
• Watch the SDK API diffs document to find
the new stuff
• Hope you like header files and
experimentation
Monday, April 29, 13
Q&A
• Slides will be posted to slideshare.net/
invalidname
• Code will be linked from there and my blog
• Watch CocoaConf glassboard,
@invalidname on Twitter/ADN, or [Time
code]; blog for announcement
• Thanks!
Monday, April 29, 13

Mais conteúdo relacionado

Mais procurados

Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)Kore VM
 
Podcasting 101
Podcasting 101Podcasting 101
Podcasting 101dwfree
 
Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)Chris Adamson
 
Media hardware
Media hardwareMedia hardware
Media hardwarecoralprout
 
How To Do A Podcast - Bsides RI 2013
How To Do A Podcast - Bsides RI 2013How To Do A Podcast - Bsides RI 2013
How To Do A Podcast - Bsides RI 2013Security Weekly
 
Audio Mastering
Audio MasteringAudio Mastering
Audio MasteringJoe Nasr
 
ALA Alex
ALA AlexALA Alex
ALA Alexabelden
 

Mais procurados (8)

Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)Lua and adaptive audio - Don Veca (Activision)
Lua and adaptive audio - Don Veca (Activision)
 
Podcasting 101
Podcasting 101Podcasting 101
Podcasting 101
 
Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)Get On The Audiobus (CocoaConf Boston, October 2013)
Get On The Audiobus (CocoaConf Boston, October 2013)
 
Media hardware
Media hardwareMedia hardware
Media hardware
 
How To Do A Podcast - Bsides RI 2013
How To Do A Podcast - Bsides RI 2013How To Do A Podcast - Bsides RI 2013
How To Do A Podcast - Bsides RI 2013
 
Audio Mastering
Audio MasteringAudio Mastering
Audio Mastering
 
Now all can shuffle
Now all can shuffleNow all can shuffle
Now all can shuffle
 
ALA Alex
ALA AlexALA Alex
ALA Alex
 

Semelhante a Core Audio in iOS 6 (CocoaConf San Jose, April 2013)

Core Audio in iOS 6 (CocoaConf Chicago, March 2013)
Core Audio in iOS 6 (CocoaConf Chicago, March 2013)Core Audio in iOS 6 (CocoaConf Chicago, March 2013)
Core Audio in iOS 6 (CocoaConf Chicago, March 2013)Chris Adamson
 
iOS Media APIs (MobiDevDay Detroit, May 2013)
iOS Media APIs (MobiDevDay Detroit, May 2013)iOS Media APIs (MobiDevDay Detroit, May 2013)
iOS Media APIs (MobiDevDay Detroit, May 2013)Chris Adamson
 
Core Audio Cranks It Up
Core Audio Cranks It UpCore Audio Cranks It Up
Core Audio Cranks It UpChris Adamson
 
Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)Chris Adamson
 
iPlayground: CarPlay and MFI Hearing Aids
iPlayground: CarPlay and MFI Hearing AidsiPlayground: CarPlay and MFI Hearing Aids
iPlayground: CarPlay and MFI Hearing AidsWeizhong Yang
 
Android Audio & OpenSL
Android Audio & OpenSLAndroid Audio & OpenSL
Android Audio & OpenSLYoss Cohen
 
Rice Emboss Bosc2009
Rice Emboss Bosc2009Rice Emboss Bosc2009
Rice Emboss Bosc2009bosc
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
 
Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)
Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)
Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)Chris Adamson
 
[COSCUP 2013] Audio Competing
[COSCUP 2013] Audio Competing[COSCUP 2013] Audio Competing
[COSCUP 2013] Audio CompetingAlive Kuo
 
Can You Hear Me Now? Exercises
Can You Hear Me Now? ExercisesCan You Hear Me Now? Exercises
Can You Hear Me Now? ExercisesAlison Aldrich
 
Camtasia Relay Training for Librarians
Camtasia Relay Training for LibrariansCamtasia Relay Training for Librarians
Camtasia Relay Training for LibrariansVic Divecha
 
Voice That Matter 2010 - Core Audio
Voice That Matter 2010 - Core AudioVoice That Matter 2010 - Core Audio
Voice That Matter 2010 - Core AudioKevin Avila
 
GitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım Klavuzu
GitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım KlavuzuGitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım Klavuzu
GitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım KlavuzuGitarPazar
 
Dev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyDev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyTony Hirst
 
Fabric-让部署变得简单
Fabric-让部署变得简单Fabric-让部署变得简单
Fabric-让部署变得简单Eric Lo
 
Integrating Voice Through Adhearsion
Integrating Voice Through AdhearsionIntegrating Voice Through Adhearsion
Integrating Voice Through AdhearsionMojo Lingo
 

Semelhante a Core Audio in iOS 6 (CocoaConf San Jose, April 2013) (20)

Core Audio in iOS 6 (CocoaConf Chicago, March 2013)
Core Audio in iOS 6 (CocoaConf Chicago, March 2013)Core Audio in iOS 6 (CocoaConf Chicago, March 2013)
Core Audio in iOS 6 (CocoaConf Chicago, March 2013)
 
iOS Media APIs (MobiDevDay Detroit, May 2013)
iOS Media APIs (MobiDevDay Detroit, May 2013)iOS Media APIs (MobiDevDay Detroit, May 2013)
iOS Media APIs (MobiDevDay Detroit, May 2013)
 
Core Audio Cranks It Up
Core Audio Cranks It UpCore Audio Cranks It Up
Core Audio Cranks It Up
 
Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)Get On The Audiobus (CocoaConf Atlanta, November 2013)
Get On The Audiobus (CocoaConf Atlanta, November 2013)
 
iPlayground: CarPlay and MFI Hearing Aids
iPlayground: CarPlay and MFI Hearing AidsiPlayground: CarPlay and MFI Hearing Aids
iPlayground: CarPlay and MFI Hearing Aids
 
Android Audio & OpenSL
Android Audio & OpenSLAndroid Audio & OpenSL
Android Audio & OpenSL
 
Rice Emboss Bosc2009
Rice Emboss Bosc2009Rice Emboss Bosc2009
Rice Emboss Bosc2009
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
 
Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)
Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)
Video Killed the Rolex Star (CocoaConf San Jose, November, 2015)
 
[COSCUP 2013] Audio Competing
[COSCUP 2013] Audio Competing[COSCUP 2013] Audio Competing
[COSCUP 2013] Audio Competing
 
Can You Hear Me Now? Exercises
Can You Hear Me Now? ExercisesCan You Hear Me Now? Exercises
Can You Hear Me Now? Exercises
 
Camtasia Relay Training for Librarians
Camtasia Relay Training for LibrariansCamtasia Relay Training for Librarians
Camtasia Relay Training for Librarians
 
Voice That Matter 2010 - Core Audio
Voice That Matter 2010 - Core AudioVoice That Matter 2010 - Core Audio
Voice That Matter 2010 - Core Audio
 
GitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım Klavuzu
GitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım KlavuzuGitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım Klavuzu
GitarPazar.com APOGEE ONE IOS Ses Kartı / Mikrofon Kullanım Klavuzu
 
IG2 Task 1
IG2 Task 1 IG2 Task 1
IG2 Task 1
 
Dev8d 2011-pipe2 py
Dev8d 2011-pipe2 pyDev8d 2011-pipe2 py
Dev8d 2011-pipe2 py
 
Fabric-让部署变得简单
Fabric-让部署变得简单Fabric-让部署变得简单
Fabric-让部署变得简单
 
Integrating Voice Through Adhearsion
Integrating Voice Through AdhearsionIntegrating Voice Through Adhearsion
Integrating Voice Through Adhearsion
 
Pcc Hardware Comp
Pcc Hardware CompPcc Hardware Comp
Pcc Hardware Comp
 
OUTPUT DEVICES
OUTPUT DEVICESOUTPUT DEVICES
OUTPUT DEVICES
 

Mais de Chris Adamson

Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)
Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)
Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)Chris Adamson
 
Whatever Happened to Visual Novel Anime? (JAFAX 2018)
Whatever Happened to Visual Novel Anime? (JAFAX 2018)Whatever Happened to Visual Novel Anime? (JAFAX 2018)
Whatever Happened to Visual Novel Anime? (JAFAX 2018)Chris Adamson
 
Media Frameworks Versus Swift (Swift by Northwest, October 2017)
Media Frameworks Versus Swift (Swift by Northwest, October 2017)Media Frameworks Versus Swift (Swift by Northwest, October 2017)
Media Frameworks Versus Swift (Swift by Northwest, October 2017)Chris Adamson
 
Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...
Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...
Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...Chris Adamson
 
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is FineCocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is FineChris Adamson
 
Forward Swift 2017: Media Frameworks and Swift: This Is Fine
Forward Swift 2017: Media Frameworks and Swift: This Is FineForward Swift 2017: Media Frameworks and Swift: This Is Fine
Forward Swift 2017: Media Frameworks and Swift: This Is FineChris Adamson
 
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...Chris Adamson
 
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Chris Adamson
 
Firebase: Totally Not Parse All Over Again (Unless It Is)
Firebase: Totally Not Parse All Over Again (Unless It Is)Firebase: Totally Not Parse All Over Again (Unless It Is)
Firebase: Totally Not Parse All Over Again (Unless It Is)Chris Adamson
 
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Chris Adamson
 
Video Killed the Rolex Star (CocoaConf Columbus, July 2015)
Video Killed the Rolex Star (CocoaConf Columbus, July 2015)Video Killed the Rolex Star (CocoaConf Columbus, July 2015)
Video Killed the Rolex Star (CocoaConf Columbus, July 2015)Chris Adamson
 
Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...
Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...
Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...Chris Adamson
 
Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014
Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014
Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014Chris Adamson
 
Stupid Video Tricks, CocoaConf Seattle 2014
Stupid Video Tricks, CocoaConf Seattle 2014Stupid Video Tricks, CocoaConf Seattle 2014
Stupid Video Tricks, CocoaConf Seattle 2014Chris Adamson
 
Stupid Video Tricks, CocoaConf Las Vegas
Stupid Video Tricks, CocoaConf Las VegasStupid Video Tricks, CocoaConf Las Vegas
Stupid Video Tricks, CocoaConf Las VegasChris Adamson
 
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)Chris Adamson
 
Stupid Video Tricks (CocoaConf DC, March 2014)
Stupid Video Tricks (CocoaConf DC, March 2014)Stupid Video Tricks (CocoaConf DC, March 2014)
Stupid Video Tricks (CocoaConf DC, March 2014)Chris Adamson
 
Introduction to the Roku SDK
Introduction to the Roku SDKIntroduction to the Roku SDK
Introduction to the Roku SDKChris Adamson
 
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)Chris Adamson
 

Mais de Chris Adamson (20)

Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)
Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)
Whatever Happened to Visual Novel Anime? (AWA/Youmacon 2018)
 
Whatever Happened to Visual Novel Anime? (JAFAX 2018)
Whatever Happened to Visual Novel Anime? (JAFAX 2018)Whatever Happened to Visual Novel Anime? (JAFAX 2018)
Whatever Happened to Visual Novel Anime? (JAFAX 2018)
 
Media Frameworks Versus Swift (Swift by Northwest, October 2017)
Media Frameworks Versus Swift (Swift by Northwest, October 2017)Media Frameworks Versus Swift (Swift by Northwest, October 2017)
Media Frameworks Versus Swift (Swift by Northwest, October 2017)
 
Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...
Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...
Fall Premieres: Media Frameworks in iOS 11, macOS 10.13, and tvOS 11 (CocoaCo...
 
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is FineCocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
 
Forward Swift 2017: Media Frameworks and Swift: This Is Fine
Forward Swift 2017: Media Frameworks and Swift: This Is FineForward Swift 2017: Media Frameworks and Swift: This Is Fine
Forward Swift 2017: Media Frameworks and Swift: This Is Fine
 
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...
Firebase: Totally Not Parse All Over Again (Unless It Is) (CocoaConf San Jose...
 
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
 
Firebase: Totally Not Parse All Over Again (Unless It Is)
Firebase: Totally Not Parse All Over Again (Unless It Is)Firebase: Totally Not Parse All Over Again (Unless It Is)
Firebase: Totally Not Parse All Over Again (Unless It Is)
 
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
 
Video Killed the Rolex Star (CocoaConf Columbus, July 2015)
Video Killed the Rolex Star (CocoaConf Columbus, July 2015)Video Killed the Rolex Star (CocoaConf Columbus, July 2015)
Video Killed the Rolex Star (CocoaConf Columbus, July 2015)
 
Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...
Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...
Revenge of the 80s: Cut/Copy/Paste, Undo/Redo, and More Big Hits (CocoaConf C...
 
Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014
Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014
Core Image: The Most Fun API You're Not Using, CocoaConf Atlanta, December 2014
 
Stupid Video Tricks, CocoaConf Seattle 2014
Stupid Video Tricks, CocoaConf Seattle 2014Stupid Video Tricks, CocoaConf Seattle 2014
Stupid Video Tricks, CocoaConf Seattle 2014
 
Stupid Video Tricks, CocoaConf Las Vegas
Stupid Video Tricks, CocoaConf Las VegasStupid Video Tricks, CocoaConf Las Vegas
Stupid Video Tricks, CocoaConf Las Vegas
 
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
Core Image: The Most Fun API You're Not Using (CocoaConf Columbus 2014)
 
Stupid Video Tricks (CocoaConf DC, March 2014)
Stupid Video Tricks (CocoaConf DC, March 2014)Stupid Video Tricks (CocoaConf DC, March 2014)
Stupid Video Tricks (CocoaConf DC, March 2014)
 
Stupid Video Tricks
Stupid Video TricksStupid Video Tricks
Stupid Video Tricks
 
Introduction to the Roku SDK
Introduction to the Roku SDKIntroduction to the Roku SDK
Introduction to the Roku SDK
 
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Core Audio in iOS 6 (CocoaConf San Jose, April 2013)

  • 1. Core Audio in iOS 6 Chris Adamson • @invalidname CocoaConf San Jose April 20, 2013 Sides and code available on my blog: http://www.subfurther.com/blog Monday, April 29, 13
  • 3. The Reviews Are In! Monday, April 29, 13
  • 4. The Reviews Are In! Monday, April 29, 13
  • 5. The Reviews Are In! Monday, April 29, 13
  • 6. The Reviews Are In! Monday, April 29, 13
  • 7. Legitimate copies! • Amazon (paper or Kindle) • Barnes & Noble (paper or Nook) • Apple (iBooks) • Direct from InformIT (paper, eBook [.epub + .mobi + .pdf], or Bundle) Monday, April 29, 13
  • 8. WhatYou’ll Learn • What Core Audio does and doesn’t do • When to use and not use it • What’s new in Core Audio for iOS 6 Monday, April 29, 13
  • 10. Simple things should be simple, complex things should be possible. –Alan Kay Monday, April 29, 13
  • 11. Simple things should be simple, complex things should be possible. –Alan Kay AV Foundation, Media Player Monday, April 29, 13
  • 12. Simple things should be simple, complex things should be possible. –Alan Kay AV Foundation, Media Player Core Audio Monday, April 29, 13
  • 13. Core Audio • Low-level C framework for processing audio • Capture, play-out, real-time or off-line processing • The “complex things should be possible” part of audio on OS X and iOS Monday, April 29, 13
  • 14. Chris’ CA Taxonomy • Engines: process streams of audio • Capture, play-out, mixing, effects processing • Helpers: deal with formats, encodings, etc. • File I/O, stream I/O, format conversion, iOS “session” management Monday, April 29, 13
  • 15. Helpers:Audio File • Read from / write to multiple audio file types (.aiff, .wav, .caf, .m4a, .mp3) in a content-agnostic way • Get metadata (data format, duration, iTunes/ID3 info) Monday, April 29, 13
  • 16. Helpers:Audio File Stream • Read audio from non-random-access source like a network stream • Discover encoding and encapsulation on the fly, then deliver audio packets to client application Monday, April 29, 13
  • 17. Helpers: Converters • Convert buffers of audio to and from different encodings • One side must be in an uncompressed format (i.e., Linear PCM) Monday, April 29, 13
  • 18. Helpers: ExtAudioFile • Combine file I/O and format conversion • Read a compressed file into PCM buffers • Write PCM buffers into a compressed file Monday, April 29, 13
  • 19. Helpers:Audio Session • iOS-only API to negotiate use of audio resources with the rest of the system • Deetermine whether your app mixes with other apps’ audio, honors ring/silent switch, can play in background, etc. • Gets notified of audio interruptions • See also AVAudioSession Monday, April 29, 13
  • 20. Engines:Audio Units • Low-latency (~10ms) processing of capture/play-out audio data • Effects, mixing, etc. • Connect units manually or via an AUGraph • Much more on this topic momentarily… Monday, April 29, 13
  • 21. Engines:Audio Queue • Convenience API for recording or play-out, built atop audio units • Rather than processing on-demand and on Core Audio’s thread, your callback provides or receives buffers of audio (at whatever size is convenient to you) • Higher latency, naturally • Supports compressed formats (MP3,AAC) Monday, April 29, 13
  • 22. Engines: Open AL • API for 3D spatialized audio, implemented atop audio units • Set a source’s properties (x/y/z coordinates, orientation, audio buffer, etc.), OpenAL renders what it sounds like to the listener from that location Monday, April 29, 13
  • 23. Engines and Helpers • Audio Units • Audio Queue • Open AL • Audio File • Audio File Stream • Audio Converter • ExtAudioFile • Audio Session Monday, April 29, 13
  • 26. Types of Audio Units • Output (which also do input) • Generator • Converter • Effect • Mixer • Music Monday, April 29, 13
  • 32. Render Callbacks AUSomething AUSomethingElse OSStatus converterInputRenderCallback (void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * ioData) { CCFWebRadioPlayer *player = (__bridge CCFWebRadioPlayer*) inRefCon; // read from buffer ioData->mBuffers[0].mData = player.preRenderData; return noErr; } Monday, April 29, 13
  • 33. AURemoteIO • Output unit used for play-out, capture • A Core Audio thread repeatedly and automatically calls AudioUnitRender() • Must set EnableIO property to explicitly enable capture and/or play-out • Capture requires setting appropriate AudioSession category Monday, April 29, 13
  • 34. Create AURemoteIO CheckError(NewAUGraph(&_auGraph), ! ! "couldn't create au graph"); ! CheckError(AUGraphOpen(_auGraph), ! ! "couldn't open au graph"); ! AudioComponentDescription componentDesc; componentDesc.componentType = kAudioUnitType_Output; componentDesc.componentSubType = kAudioUnitSubType_RemoteIO; componentDesc.componentManufacturer = kAudioUnitManufacturer_Apple; ! AUNode remoteIONode; CheckError(AUGraphAddNode(_auGraph, ! ! ! ! ! ! &componentDesc, ! ! ! ! ! ! &remoteIONode), ! ! "couldn't add remote io node"); Monday, April 29, 13
  • 35. Getting an AudioUnit from AUNode ! CheckError(AUGraphNodeInfo(self.auGraph, ! ! ! ! ! ! ! remoteIONode, ! ! ! ! ! ! ! NULL, ! ! ! ! ! ! ! &_remoteIOUnit), ! ! ! "couldn't get remote io unit from node"); Monday, April 29, 13
  • 37. AURemoteIO Buses AURemoteIO bus 0 to output H/W Monday, April 29, 13
  • 38. AURemoteIO Buses AURemoteIO bus 0 to output H/W bus 0 from app Monday, April 29, 13
  • 39. AURemoteIO Buses AURemoteIO bus 0 to output H/W bus 1 from input H/W bus 0 from app Monday, April 29, 13
  • 40. AURemoteIO Buses AURemoteIO bus 0 to output H/W bus 1 from input H/W bus 1 to app bus 0 from app Monday, April 29, 13
  • 41. EnableIO ! UInt32 oneFlag = 1; ! UInt32 busZero = 0; ! CheckError(AudioUnitSetProperty(self.remoteIOUnit, ! ! ! ! ! ! ! ! ! kAudioOutputUnitProperty_EnableIO, ! ! ! ! ! ! ! ! ! kAudioUnitScope_Output, ! ! ! ! ! ! ! ! ! busZero, ! ! ! ! ! ! ! ! ! &oneFlag, ! ! ! ! ! ! ! ! ! sizeof(oneFlag)), ! ! ! "couldn't enable remote io output"); ! UInt32 busOne = 1; ! CheckError(AudioUnitSetProperty(self.remoteIOUnit, ! ! ! ! ! ! ! ! ! kAudioOutputUnitProperty_EnableIO, ! ! ! ! ! ! ! ! ! kAudioUnitScope_Input, ! ! ! ! ! ! ! ! ! busOne, ! ! ! ! ! ! ! ! ! &oneFlag, ! ! ! ! ! ! ! ! ! sizeof(oneFlag)), ! ! ! "couldn't enable remote io input"); Monday, April 29, 13
  • 42. Pass Through AURemoteIO bus 1 from input H/W bus 0 to output H/W Monday, April 29, 13
  • 43. Connect In to Out ! UInt32 busZero = 0; ! UInt32 busOne = 1; ! CheckError(AUGraphConnectNodeInput(self.auGraph, ! ! ! ! ! ! ! ! ! remoteIONode, ! ! ! ! ! ! ! ! ! busOne, ! ! ! ! ! ! ! ! ! remoteIONode, ! ! ! ! ! ! ! ! ! busZero), ! ! ! "couldn't connect remote io bus 1 to 0"); Monday, April 29, 13
  • 44. Pass-Through with Effect bus 0 to output H/W AURemoteIO AUEffect bus 1 from input H/W Monday, April 29, 13
  • 45. Demo: Delay Effect New in iOS 6! Monday, April 29, 13
  • 46. Creating the AUDelay ! componentDesc.componentType = kAudioUnitType_Effect; ! componentDesc.componentSubType = kAudioUnitSubType_Delay; ! componentDesc.componentManufacturer = kAudioUnitManufacturer_Apple; ! ! AUNode effectNode; ! CheckError(AUGraphAddNode(self.auGraph, ! ! ! ! ! ! ! &componentDesc, ! ! ! ! ! ! ! &effectNode), ! ! ! "couldn't create effect node"); ! AudioUnit effectUnit; ! CheckError(AUGraphNodeInfo(self.auGraph, ! ! ! ! ! ! ! effectNode, ! ! ! ! ! ! ! NULL, ! ! ! ! ! ! ! &effectUnit), ! ! ! "couldn't get effect unit from node"); Monday, April 29, 13
  • 47. The problem with effect units • Audio Units available since iPhone OS 2.0 prefer int formats • Effect units arrived with iOS 5 (arm7 era) and only work with float format • Have to set the AUEffect unit’s format on AURemoteIO Monday, April 29, 13
  • 48. Setting formats ! AudioStreamBasicDescription effectDataFormat; ! UInt32 propSize = sizeof (effectDataFormat); ! CheckError(AudioUnitGetProperty(effectUnit, ! ! ! ! ! ! ! ! ! kAudioUnitProperty_StreamFormat, ! ! ! ! ! ! ! ! ! kAudioUnitScope_Output, ! ! ! ! ! ! ! ! ! busZero, ! ! ! ! ! ! ! ! ! &effectDataFormat, ! ! ! ! ! ! ! ! ! &propSize), ! ! ! "couldn't read effect format"); ! CheckError(AudioUnitSetProperty(self.remoteIOUnit, ! ! ! ! ! ! ! ! ! kAudioUnitProperty_StreamFormat, ! ! ! ! ! ! ! ! ! kAudioUnitScope_Output, ! ! ! ! ! ! ! ! ! busOne, ! ! ! ! ! ! ! ! ! &effectDataFormat, ! ! ! ! ! ! ! ! ! propSize), ! ! ! "couldn't set bus one output format"); Then repeat AudioUnitSetProperty() for input scope / bus 0 Monday, April 29, 13
  • 49. AUNewTimePitch • New in iOS 6! • Allows you to change pitch independent of time, or time independent of pitch • How do you use it? Monday, April 29, 13
  • 50. AUTimePitch ! AudioComponentDescription effectcd = {0}; ! effectcd.componentType = kAudioUnitType_FormatConverter; ! effectcd.componentSubType = kAudioUnitSubType_NewTimePitch; ! effectcd.componentManufacturer = kAudioUnitManufacturer_Apple; ! ! AUNode effectNode; ! CheckError(AUGraphAddNode(self.auGraph, ! ! ! ! ! ! ! &effectcd, ! ! ! ! ! ! ! &effectNode), ! ! ! "couldn't get effect node [time/pitch]"); Notice the type is AUFormatConverter, not AUEffect Monday, April 29, 13
  • 51. AudioUnitParameters.h // Parameters for AUNewTimePitch enum { ! ! // Global, rate, 1/32 -> 32.0, 1.0 ! kNewTimePitchParam_Rate!! ! ! ! ! ! = 0, ! ! // Global, Cents, -2400 -> 2400, 1.0 ! kNewTimePitchParam_Pitch! ! ! ! ! ! = 1, ! ! // Global, generic, 3.0 -> 32.0, 8.0 ! kNewTimePitchParam_Overlap! ! ! ! ! ! = 4, ! ! // Global, Boolean, 0->1, 1 ! kNewTimePitchParam_EnablePeakLocking! ! ! = 6 }; This is the entire documentation for the AUNewTimePitch parameters Monday, April 29, 13
  • 52. AUNewTimePitch parameters • Rate: kNewTimePitchParam_Rate takes a Float32 rate from 1/32 speed to 32x speed. • Use powers of 2: 1/32, 1/16, …, 2, 4, 8… • Pitch: kNewTimePitchParam_Pitch takes a Float32 representing cents, meaning 1/100 of a musical semitone Monday, April 29, 13
  • 53. Pitch shifting • Pitch can vary, time does not • Suitable for real-time sources, such as audio capture Monday, April 29, 13
  • 54. Demo: Pitch Shift New in iOS 6! Monday, April 29, 13
  • 55. Rate shifting • Rate can vary, pitch does not • Think of 1.5x and 2x speed modes in Podcasts app • Not suitable for real-time sources, as data will be consumed faster. Files work well. • Sources must be able to map time systems with kAudioUnitProperty_InputSamplesInOutput Monday, April 29, 13
  • 56. Demo: Rate Shift New in iOS 6! Monday, April 29, 13
  • 59. Audio Queues (and the APIs that help them) Monday, April 29, 13
  • 60. AudioQueue • Easier than AURemoteIO - provide data when you want to, less time pressure, can accept or provide compressed formats (MP3,AAC) • Recording queue - receive buffers of captured audio in a callback • Play-out queue - enqueue buffers of audio to play, optionally refill in a callback Monday, April 29, 13
  • 65. Common AQ scenarios • File player - Read from file and “prime” queue buffers, start queue, when called back with used buffer, refill from next part of file • Synthesis - Maintain state in your own code, write raw samples into buffers during callbacks Monday, April 29, 13
  • 66. Web Radio • Project from Thursday’s workshop • Use Audio File Stream Services to pick out audio data from a network stream • Enqueue these packets as new AQ buffers • Dispose used buffers in callback Monday, April 29, 13
  • 68. Parsing web radio NSData NSData Packets Packets Packets Packets Packets NSURLConnection delivers NSData buffers, containing audio and framing info.We pass it to Audio File Services. Monday, April 29, 13
  • 69. Parsing web radio NSData NSData Packets Packets Packets Packets Packets Packets Packets Packets Packets Packets NSURLConnection delivers NSData buffers, containing audio and framing info.We pass it to Audio File Services. Audio File Services calls us back with parsed packets of audio data. Monday, April 29, 13
  • 70. Parsing web radio NSData NSData Packets Packets Packets Packets Packets Packets Packets Packets Packets Packets 012 Packets Packets Packets Packets Packets Packets NSURLConnection delivers NSData buffers, containing audio and framing info.We pass it to Audio File Services. Audio File Services calls us back with parsed packets of audio data. We create an AudioQueueBuffer with those packets and enqueue it for play-out. Monday, April 29, 13
  • 71. A complex thing! • What if we want to see that data after it’s been decoded to PCM and is about to be played? • e.g., spectrum analysis, effects, visualizers • AudioQueue design is “fire-and-forget” Monday, April 29, 13
  • 73. AudioQueueProcessingTap • Set as a property on the Audio Queue • Calls back to your function with decoded (PCM) audio data • Three types: pre- or post- effects (that the AQ performs), or siphon. First two can modify the data. • Only documentation is in AudioQueue.h Monday, April 29, 13
  • 74. Creating an AQ Tap ! ! // create the tap ! ! UInt32 maxFrames = 0; ! ! AudioStreamBasicDescription tapFormat = {0}; ! ! AudioQueueProcessingTapRef tapRef; ! ! CheckError(AudioQueueProcessingTapNew(audioQueue, ! ! ! ! ! ! ! ! ! ! ! tapProc, ! ! ! ! ! ! ! ! ! ! ! (__bridge void *)(player), ! ! ! ! ! ! ! ! ! ! ! kAudioQueueProcessingTap_PreEffects, ! ! ! ! ! ! ! ! ! ! ! &maxFrames, ! ! ! ! ! ! ! ! ! ! ! &tapFormat, ! ! ! ! ! ! ! ! ! ! ! &tapRef), ! ! ! ! "couldn't create AQ tap"); Notice that you receive maxFrames and tapFormat.These do not appear to be settable. Monday, April 29, 13
  • 75. AQ Tap Proc void tapProc (void * inClientData, ! ! ! AudioQueueProcessingTapRef inAQTap, ! ! ! UInt32 inNumberFrames, ! ! ! AudioTimeStamp * ioTimeStamp, ! ! ! UInt32 * ioFlags, ! ! ! UInt32 * outNumberFrames, ! ! ! AudioBufferList * ioData) { ! CCFWebRadioPlayer *player = (__bridge CCFWebRadioPlayer*) inClientData; ! UInt32 getSourceFlags = 0; ! UInt32 getSourceFrames = 0; ! AudioQueueProcessingTapGetSourceAudio(inAQTap, ! ! ! ! ! ! ! ! ! ! inNumberFrames, ! ! ! ! ! ! ! ! ! ! ioTimeStamp, ! ! ! ! ! ! ! ! ! ! &getSourceFlags, ! ! ! ! ! ! ! ! ! ! &getSourceFrames, ! ! ! ! ! ! ! ! ! ! ioData); // then do something with ioData // ... Monday, April 29, 13
  • 76. So what should we do with the audio? Monday, April 29, 13
  • 77. So what should we do with the audio? Let’s apply our pitch-shift effect Monday, April 29, 13
  • 80. AudioUnitRender() • Last argument is an AudioBufferList, whose AudioBuffer members have mData pointers • If mData != NULL, audio unit does its thing with those samples • If mData == NULL, audio data pulls from whatever it’s connected to • So we just call with AudioBufferList ioData we got from tap callback, right? Monday, April 29, 13
  • 81. Psych! • AQ tap provides data as signed ints • Effect units only work with floating point • We need to do an on-the-spot format conversion Monday, April 29, 13
  • 82. invalidname’s convert- and-effect recipe AUGenericOutputAUConverterAUEffectAUConverter OSStatus converterInputRenderCallback (void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList * ioData) { CCFWebRadioPlayer *player = (__bridge CCFWebRadioPlayer*) inRefCon; // read from buffer ioData->mBuffers[0].mData = player.preRenderData; return noErr; } Note: red arrows are float format, yellow arrows are int Monday, April 29, 13
  • 83. How it works • AUGraph:AUConverter → AUEffect → AUConverter → AUGenericOutput • Top AUConverter is connected to a render callback function Monday, April 29, 13
  • 84. The trick! • Copy mData pointer to a state variable and NULL it in ioData • Call AudioQueueRender() on output unit. The NULL makes it pull from the graph. • Top of the graph pulls on render callback, which gives it back the mData we copied off. Monday, April 29, 13
  • 85. Yes, really This is the rest of tapProc() ! // copy off the ioData so the graph can read from it // in render callback ! player.preRenderData = ioData->mBuffers[0].mData; ! ioData->mBuffers[0].mData = NULL; ! ! OSStatus renderErr = noErr; ! AudioUnitRenderActionFlags actionFlags = 0; ! renderErr = AudioUnitRender(player.genericOutputUnit, ! ! ! ! ! ! ! ! &actionFlags, ! ! ! ! ! ! ! ! player.renderTimeStamp, ! ! ! ! ! ! ! ! 0, ! ! ! ! ! ! ! ! inNumberFrames, ! ! ! ! ! ! ! ! ioData); ! NSLog (@"AudioUnitRender, renderErr = %ld",renderErr); } Monday, April 29, 13
  • 86. Yes, really OSStatus converterInputRenderCallback (void *inRefCon, ! ! ! ! ! ! ! ! ! AudioUnitRenderActionFlags *ioActionFlags, ! ! ! ! ! ! ! ! ! const AudioTimeStamp *inTimeStamp, ! ! ! ! ! ! ! ! ! UInt32 inBusNumber, ! ! ! ! ! ! ! ! ! UInt32 inNumberFrames, ! ! ! ! ! ! ! ! ! AudioBufferList * ioData) { ! CCFWebRadioPlayer *player = (__bridge CCFWebRadioPlayer*) inRefCon; ! ! // read from buffer ! ioData->mBuffers[0].mData = player.preRenderData; ! return noErr; } This is the render callback that supplies data to the int→float converter Monday, April 29, 13
  • 87. Demo:AQ Tap + AUNewTimePitch New in iOS 6! Monday, April 29, 13
  • 89. Meanwhile in a mini- bus near Copenhagan… Monday, April 29, 13
  • 91. Audiobus • Allows multiple audio apps to exchange data in realtime • Works by sending raw data in MIDI • Actually approved by Apple • Actually supported in GarageBand Monday, April 29, 13
  • 94. Supporting Audiobus • Get the SDK from audiob.us • Enable background mode, add an audiobus- compatible URL scheme, get API key from audiob.us • Create and use ABAudiobusController, ABOutputPort/ABInputPort, and ABAudiobusAudioUnitWrapper Monday, April 29, 13
  • 96. Takeaways • Core Audio fundamentals never change • New stuff is added as properties, typedefs, enums, etc. • Watch the SDK API diffs document to find the new stuff • Hope you like header files and experimentation Monday, April 29, 13
  • 97. Q&A • Slides will be posted to slideshare.net/ invalidname • Code will be linked from there and my blog • Watch CocoaConf glassboard, @invalidname on Twitter/ADN, or [Time code]; blog for announcement • Thanks! Monday, April 29, 13