This file contains hidden or 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
-(NSString*)descriptionForAudioFormat:(AudioStreamBasicDescription) audioFormat | |
{ | |
NSMutableString *description = [NSMutableString new]; | |
// From https://developer.apple.com/library/ios/documentation/MusicAudio/Conceptual/AudioUnitHostingGuide_iOS/ConstructingAudioUnitApps/ConstructingAudioUnitApps.html (Listing 2-8) | |
char formatIDString[5]; | |
UInt32 formatID = CFSwapInt32HostToBig (audioFormat.mFormatID); | |
bcopy (&formatID, formatIDString, 4); | |
formatIDString[4] = '\0'; | |