Skip to content

Instantly share code, notes, and snippets.

@myrual
Created July 5, 2014 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myrual/b8e88c6609ac411314f3 to your computer and use it in GitHub Desktop.
Save myrual/b8e88c6609ac411314f3 to your computer and use it in GitHub Desktop.
audio session init
audio session active
set audio category
set audio route change notification
prefer_buffer 005
get sample hardware rate
setup rio for input
setup rio for ouput
render callback kAudioUnitProperty_SetRenderCallback
outFormat.SetAUCanonical(2, false);
XThrowIfError(AudioUnitSetProperty(inRemoteIOUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &outFormat, sizeof(outFormat)), "couldn't set the remote I/O unit's output client format");
XThrowIfError(AudioUnitSetProperty(inRemoteIOUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 1, &outFormat, sizeof(outFormat)), "couldn't set the remote I/O unit's input client format");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment