title: Stream Song to Device with Multipeer Connectivity - Swift
body: <p>I'm using Multipeer Connectivity to pair two devices and want to stream a song from one device to the other in <code>Swift</code>.  I've been following <a href="https://robots.thoughtbot.com/streaming-audio-to-multiple-listeners-via-ios-multipeer-connectivity" rel="nofollow">this walkthrough in Objective-C</a> closely as well as Apple's documentation, but I admittedly don't have any Obj-C experience.</p>
  
  <p>I'm able to get the track output from AVAssetReaderTrackOutput, add that to an AVAssetReader, and finally start reading.  However, once <code>CMSampleBufferRef</code> enters the equation, I start to lose sight of what's actually happening.</p>
  
  <p>If anyone can explain the process of getting samples from the track output and then drilling down to put that data into a stream that MC can consume, that would be much appreciated.</p>