title: Generate a sound (not from a file)
body: <p>I'm building a small game prototype, and I'd like to be able to play simple sounds whose length/tone/pitch will vary based on what the user is doing.</p>
  
  <p>This is surprisingly hard to do. Closest resource I found was: </p>
  
  <p><a href="http://www.tmroyal.com/playing-sounds-in-swift-audioengine.html" rel="noreferrer">http://www.tmroyal.com/playing-sounds-in-swift-audioengine.html</a></p>
  
  <p>But this does not actually generate any sound on my device or on the iOS simulator.</p>
  
  <p>Does anyone know of any working code to play ANY procedurally generated audio? Simple Sine Wave would do.</p>