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
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): |
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
first public gist |
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
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; |
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
CMTimeRange fadeInRange = CMTimeRangeMake(CMTimeMake(0, 1), CMTimeMake(self.fadeInToSec, 1)); | |
[fadeInParameter setVolumeRampFromStartVolume:0.0 toEndVolume:1.0 | |
timeRange:fadeInRange]; | |
[parameters addObject:fadeInParameter]; |
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
OSStatus | |
MyAudioCallback(AudioConverterRef inAudioConverter, | |
UInt32 *ioDataPacketCount, | |
AudioBufferList *ioData, | |
AudioStreamPacketDescription **outDataPacketDescription, | |
void *inUserData); |
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
UInt32 allowMixing = NO; | |
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers, | |
sizeof (allowMixing), | |
&allowMixing); |
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
AudioSessionInitialize(NULL, | |
NULL, | |
InterruptionListenerCallback, | |
clientData); |
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
@interface MediaPicker() | |
@property (nonatomic, retain) MPMediaPickerController *picker; | |
@end | |
@implementation PYSMediaPicker | |
@synthesize picker; | |
@synthesize delegate; | |
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
- (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"; |
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
// 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