ssfrr/AudioIO.jl — pull request #20 by bauglir (2014-08-01 12:16:56+00:00)
Title: Fixes and an extension for libsndfile

Playing a file using code such as

```julia
using AudioIO
file = af_open("/usr/share/sounds/alsa/Front_Center.wav")
stream = AudioIO.PortAudioStream(int(file.sfinfo.samplerate), 64)
play(file, stream)
sleep(file.sfinfo.frames / file.sfinfo.samplerate)
```

did not work for me, since no data (more precisely just a single frame) would be read from the file. So I made some changes that make this work. These include being a bit more explicit about the number of channels being read and stopping trying to read from a file if no data is being returned for it anymore.

I also added some wrappers for the seek functionality included in libsndfile so that it becomes possible to let a sound file play on repeat, by rewinding it. I needed this functionality for a demo I'm working on and thought I'd share it while I'm at it.

I've tried to keep the updates self-contained, so you can rebase anything out if you don't like it :smile:.