Skip to content

Instantly share code, notes, and snippets.

@enigmaticape
Last active January 3, 2016 11:29
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 enigmaticape/8456297 to your computer and use it in GitHub Desktop.
Save enigmaticape/8456297 to your computer and use it in GitHub Desktop.
Rendering callback using more general code.
OSStatus RenderToneWithState
(
void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList *ioData
)
{
fillWaveSamples( (WaveState*)inRefCon,
inNumberFrames,
(Float32 *)ioData->mBuffers[ 0 ].mData );
return noErr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment