         
         return (nil, nil)
     }
-}+    
+    static func createSilentAudioSampleBufferWithFormatDescription(formatDescription:CMAudioFormatDescription,
+                                                                   numSamples: Int,
+                                                                   presentationTime: CMTime) -> CMSampleBuffer?
+    {
+        let audioStreamBasicDescription = CMAudioFormatDescriptionGetStreamBasicDescription(formatDescription).memory
+        let blockSize: size_t = numSamples * Int(audioStreamBasicDescription.mBytesPerFrame); // TODO: Probably need to calc in another way
+        var blockPointer: CMBlockBuffer? = nil
+        CMBlockBufferCreateWithMemoryBlock(kCFAllocatorDefault,
+                                           nil,
+                                           blockSize,
+                                           nil,
+                                           nil,
+                                           0,
+                                           blockSize,
+                                           0,
+                                           &blockPointer);
+        
+        guard let block = blockPointer else {
+            return nil
+        }
+        
+        CMBlockBufferFillDataBytes(0, block, 0, blockSize);
+        
+        var sampleBuffer: CMSampleBuffer? = nil;
+        CMAudioSampleBufferCreateReadyWithPacketDescriptions(kCFAllocatorDefault,
+                                                             block,
+                                                             formatDescription,
+                                                             numSamples,
+                                                             presentationTime,
+                                                             nil,
+                                                             &sampleBuffer);
+        return sampleBuffer;
+    }
+}

                        }
                        
                        videoInput.appendSampleBuffer(videoSampleBuffer)
                        lastVideoPts = CMSampleBufferGetPresentationTimeStamp(videoSampleBuffer)
                        
                        if VideoMergeManagerPrintPts {

                            }
                            
                            audioInput!.appendSampleBuffer(audioSampleBuffer)
                            audioBuffers += 1
                            lastAudioPts = currentPts
                            lastAudioDuration = duration
                            
