View ipa_dir_observer.py
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
import sys | |
import time | |
from subprocess import Popen | |
from watchdog.observers import Observer | |
from watchdog.events import RegexMatchingEventHandler | |
class IpaDirectoryEventHandler(RegexMatchingEventHandler): | |
def on_modified(self, event): |
View ololo.txt
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
first public gist |
View AVAssetExportSessionExport
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
AVMutableAudioMix *exportAudioMix = [AVMutableAudioMix audioMix]; | |
exportAudioMix.inputParameters = parameters; | |
AVAssetExportSession *export = | |
[[AVAssetExportSession alloc] initWithAsset:mixComposition | |
presetName:AVAssetExportPresetAppleM4A]; | |
export.outputFileType = @"com.apple.m4a-audio"; | |
export.outputURL = outputFileUrl; | |
export.audioMix = exportAudioMix; |
View gist:5093069
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
CMTimeRange fadeInRange = CMTimeRangeMake(CMTimeMake(0, 1), CMTimeMake(self.fadeInToSec, 1)); | |
[fadeInParameter setVolumeRampFromStartVolume:0.0 toEndVolume:1.0 | |
timeRange:fadeInRange]; | |
[parameters addObject:fadeInParameter]; |
View gist:5093078
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
OSStatus | |
MyAudioCallback(AudioConverterRef inAudioConverter, | |
UInt32 *ioDataPacketCount, | |
AudioBufferList *ioData, | |
AudioStreamPacketDescription **outDataPacketDescription, | |
void *inUserData); |
View gist:5093085
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
UInt32 allowMixing = NO; | |
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers, | |
sizeof (allowMixing), | |
&allowMixing); |
View gist:5093093
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
AudioSessionInitialize(NULL, | |
NULL, | |
InterruptionListenerCallback, | |
clientData); |
View MediaPicker.mm
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
@interface MediaPicker() | |
@property (nonatomic, retain) MPMediaPickerController *picker; | |
@end | |
@implementation PYSMediaPicker | |
@synthesize picker; | |
@synthesize delegate; | |
View gist:5093866
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)presentPicker | |
{ | |
[Flurry logEvent:@"Picker presented"]; | |
self.picker = | |
[[[MPMediaPickerController alloc] | |
initWithMediaTypes: MPMediaTypeAnyAudio] autorelease]; | |
[picker setDelegate:self]; | |
[picker setAllowsPickingMultipleItems:NO]; | |
picker.prompt = @"Choose sound to process"; |
View swizzler.c
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
// Here a cave in which live all runtime dragons and wizards | |
#include <objc/runtime.h> | |
// We can swap instance methods, they start with '-' minus sign, you know | |
static void instance_methods_swap(id object, SEL firstSel, SEL secondSel) { | |
method_exchangeImplementations( | |
class_getInstanceMethod(object, firstSel), | |
class_getInstanceMethod(object, secondSel)); | |
} |
OlderNewer