Advertisement
Guest User

Core Audio result checking

a guest
Aug 21st, 2012
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define checkResult(result,operation) (_checkResult((result),(operation),strrchr(__FILE__, '/'),__LINE__))
  2.  
  3. static inline BOOL _checkResult(OSStatus result, const char *operation, const char* file, int line) {
  4.     if ( result != noErr ) {
  5.         NSLog(@"%s:%d: %s result %d %08X %4.4s\n", file, line, operation, (int)result, (int)result, (char*)&result);
  6.         return NO;
  7.     }
  8.     return YES;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement