Skip to content

Instantly share code, notes, and snippets.

View elfenlaid's full-sized avatar
🐧
Slow Distillation ⚗️💭

Egor Mihnevich elfenlaid

🐧
Slow Distillation ⚗️💭
View GitHub Profile
AudioSessionInitialize(NULL,
NULL,
InterruptionListenerCallback,
clientData);
UInt32 allowMixing = NO;
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryMixWithOthers,
sizeof (allowMixing),
&allowMixing);
OSStatus
MyAudioCallback(AudioConverterRef inAudioConverter,
UInt32 *ioDataPacketCount,
AudioBufferList *ioData,
AudioStreamPacketDescription **outDataPacketDescription,
void *inUserData);
CMTimeRange fadeInRange = CMTimeRangeMake(CMTimeMake(0, 1), CMTimeMake(self.fadeInToSec, 1));
[fadeInParameter setVolumeRampFromStartVolume:0.0 toEndVolume:1.0
timeRange:fadeInRange];
[parameters addObject:fadeInParameter];
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;
first public gist
@elfenlaid
elfenlaid / ipa_dir_observer.py
Last active December 14, 2015 00:29
Observe given directory and tag added IPA files
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):