Created
December 6, 2012 17:08
-
-
Save tkemp/4226150 to your computer and use it in GitHub Desktop.
Print an AudioStreamBasicDescription for a given AUGraph node
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
-(void) printASBDforNode:(AUNode) node scope:(int) scope bus:(int) bus { | |
AudioStreamBasicDescription testASBD; | |
UInt32 asbdSize = sizeof (AudioStreamBasicDescription); | |
AudioUnit nodeUnit; | |
AUGraphNodeInfo(_graph, node, NULL, &nodeUnit); | |
AudioUnitGetProperty(nodeUnit, | |
kAudioUnitProperty_StreamFormat, | |
scope, | |
bus, // bus | |
&testASBD, | |
&asbdSize); | |
NSLog (@"Node: %ld bus %d scope %d. rate: %f, %ld channels, %ld bits per channel", node, bus, scope, testASBD.mSampleRate, testASBD.mChannelsPerFrame, testASBD.mBitsPerChannel); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment