Created
October 8, 2011 21:59
-
-
Save artgillespie/1272941 to your computer and use it in GitHub Desktop.
non-interleaved 32-bit floats for RemoteIO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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