title: Set OS X volume in OS X 10.11 using Swift without using the deprecated AudioHardwareServiceSetPropertyData API
body: <p>I found <a href="https://stackoverflow.com/questions/27290751/how-to-set-systems-master-volume-from-a-swift-app-in-osx">this code</a> to set the system volume using Swift. While using the code in a playground I got warning.</p>
  
  <blockquote>
    <p>AudioHardwareServiceSetPropertyData was deprecated in OS X 10.11</p>
  </blockquote>
  
  <p>How do I update the code for OS X 10.11?</p>
  
  <p>Thanks.
  :)</p>