title: NSSound-like framework that works, but doesn't require dealing with a steep learning curve
body: <p>I've pretty much finished work on a white noise feature for one of my applications using NSSound to play a loop of 10 second AAC-encoded pre-recorded white noise.</p>
  
  <pre><code>[sound setLoops: YES]
  </code></pre>
  
  <p>should be all that's required, right?</p>
  
  <p>It works like a charm but I've noticed that there is an audible pause between the sound file finishing and restarting.. a sort of "plop" sound. This isn't present when looping the original sound files and after an hour or so of trying to figure this out, I've come to the conclusion that NSSound sucks and that the audible pause is an artefact of the synchronisation of the private background thread playing the sound. It seems to be dependent on the main run loop somehow and this causes the audible gap between the end and restarting of the sound.</p>
  
  <p>I know very little about sound stuff and this is a very minor feature, so I don't want to get into the depths of CoreAudio just to play a looping 10s sound fragment.. so I went chasing after a nice alternative, but nothing seems to quite fit:</p>
  
  <ul>
  <li>Core Audio: total overkill, but at least a standard framework </li>
  <li>AudioQueue: complicated, with C++ sample code!?</li>
  <li>MusicKit/ SndKit: also huge learning curve, based on lots of open source stuff, etc.</li>
  </ul>
  
  <p>I saw that AVFoundation on iOS 4 would be a nice way to play sounds, but that's only scheduled for Mac OS X 10.7..</p>
  
  <p>Is there any easy-to-use way of reliably looping sound on Mac OS X 10.5+?</p>
  
  <p>Is there any sample code for AudioQueue or Core Audio that takes the pain out of using them from an Objective-C application?</p>
  
  <p>Any help would be very much appreciated..</p>
  
  <p>Best regards,</p>
  
  <p>Frank</p>