Skip to content

Instantly share code, notes, and snippets.

@tonycn
tonycn / build_for_iphoneos.sh
Created July 31, 2012 10:28 — forked from fbettag/build_for_iphoneos.sh
libsox compile script for iPhoneOS/iOS
#!/bin/bash
################################################################################
#
# Copyright (c) 2008-2009 Christopher J. Stawarz
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
@tonycn
tonycn / OSStatus.m
Last active December 28, 2015 21:39 — forked from zoul/OSStatus.m
#import <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
NSString *NSStringFromOSStatus(OSStatus errCode)
{
if (errCode == noErr)
return @"noErr";
char message[5] = {0};
*(UInt32*) message = CFSwapInt32HostToBig(errCode);
return [NSString stringWithCString:message encoding:NSASCIIStringEncoding];