Skip to content

Instantly share code, notes, and snippets.

@artgillespie
Created October 8, 2011 21:59
Show Gist options
  • Save artgillespie/1272941 to your computer and use it in GitHub Desktop.
Save artgillespie/1272941 to your computer and use it in GitHub Desktop.
non-interleaved 32-bit floats for RemoteIO
AudioStreamBasicDescription outputStreamDesc;
outputStreamDesc.mSampleRate = 44100.;
outputStreamDesc.mBitsPerChannel = 32;
outputStreamDesc.mBytesPerFrame = 4;
outputStreamDesc.mBytesPerPacket = 4;
outputStreamDesc.mChannelsPerFrame = 2;
outputStreamDesc.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagIsNonInterleaved;
outputStreamDesc.mFormatID = kAudioFormatLinearPCM;
outputStreamDesc.mFramesPerPacket = 1;
outputStreamDesc.mReserved = 0;
// we'd like 32-bit floats from the I/O, please
err = AudioUnitSetProperty(mRemoteIOAU, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 0, &outputStreamDesc, sizeof(outputStreamDesc));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment