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
@implementation AVAudioPCMBuffer (LiveAdditions) | |
- (AVAudioPCMBuffer *)combineWithBuffer:(AVAudioPCMBuffer *)buffer { | |
if (![buffer.format isEqual:self.format]) { | |
return nil; | |
} | |
AVAudioPCMBuffer *combined = [[AVAudioPCMBuffer alloc] initWithPCMFormat:self.format frameCapacity:self.frameCapacity + buffer.frameCapacity]; | |
combined.frameLength = self.frameLength + buffer.frameLength; |
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 subprocess | |
import sys | |
def run_command(command): | |
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
while True: | |
output = process.stdout.read(1).decode() | |
if output == '' and process.poll() is not None: | |
break | |
if output != '': |
OlderNewer